mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
Another minor bugfix
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "com.unciv.game"
|
applicationId "com.unciv.game"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 141
|
versionCode 142
|
||||||
versionName "2.8.9"
|
versionName "2.8.10"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
@ -80,6 +80,7 @@ class CityConstructions {
|
|||||||
else if (GameBasics.Units.containsKey(constructionName))
|
else if (GameBasics.Units.containsKey(constructionName))
|
||||||
return GameBasics.Units[constructionName]!!
|
return GameBasics.Units[constructionName]!!
|
||||||
else{
|
else{
|
||||||
|
if(constructionName=="") return getConstruction("Nothing")
|
||||||
val special = SpecialConstruction.getSpecialConstructions().firstOrNull{it.name==constructionName}
|
val special = SpecialConstruction.getSpecialConstructions().firstOrNull{it.name==constructionName}
|
||||||
if(special!=null) return special
|
if(special!=null) return special
|
||||||
}
|
}
|
||||||
@ -120,10 +121,9 @@ class CityConstructions {
|
|||||||
|
|
||||||
// Let's try to remove the building from the city, and see if we can still build it (we need to remove because of wonders etc.)
|
// Let's try to remove the building from the city, and see if we can still build it (we need to remove because of wonders etc.)
|
||||||
val saveCurrentConstruction = currentConstruction
|
val saveCurrentConstruction = currentConstruction
|
||||||
currentConstruction = "lie"
|
currentConstruction = ""
|
||||||
if (!construction.isBuildable(this)) {
|
if (!construction.isBuildable(this)) {
|
||||||
// We can't build this building anymore! (Wonder has been built / resource is gone / etc.)
|
// We can't build this building anymore! (Wonder has been built / resource is gone / etc.)
|
||||||
currentConstruction=""
|
|
||||||
cityInfo.civInfo.addNotification("Cannot continue work on [$saveCurrentConstruction]", cityInfo.location, Color.BROWN)
|
cityInfo.civInfo.addNotification("Cannot continue work on [$saveCurrentConstruction]", cityInfo.location, Color.BROWN)
|
||||||
Automation().chooseNextConstruction(this)
|
Automation().chooseNextConstruction(this)
|
||||||
construction = getConstruction(currentConstruction)
|
construction = getConstruction(currentConstruction)
|
||||||
|
@ -174,8 +174,9 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||||||
val percentageComplete = civInfo.tech.costOfTech(tech) / civInfo.tech.costOfTech(tech).toFloat()
|
val percentageComplete = civInfo.tech.costOfTech(tech) / civInfo.tech.costOfTech(tech).toFloat()
|
||||||
// todo
|
// todo
|
||||||
techButton.add()
|
techButton.add()
|
||||||
|
val turnsToTech = civInfo.tech.turnsToTech(tech)
|
||||||
techButton.add(Label(tech.tr() + "\r\n"
|
techButton.add(Label(tech.tr() + "\r\n"
|
||||||
+ civInfo.tech.turnsToTech(tech) + " {turns}".tr(),skin)
|
+ turnsToTech + (if(turnsToTech>1) " {turns}".tr() else " {turn}".tr()),skin)
|
||||||
.setFontColor(Color.WHITE).setFont(22))
|
.setFontColor(Color.WHITE).setFont(22))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user