diff --git a/android/build.gradle b/android/build.gradle index df156ea4d8..eb324900c0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 141 - versionName "2.8.9" + versionCode 142 + versionName "2.8.10" } buildTypes { release { diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index 83ef642c7c..0626fcec51 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -80,6 +80,7 @@ class CityConstructions { else if (GameBasics.Units.containsKey(constructionName)) return GameBasics.Units[constructionName]!! else{ + if(constructionName=="") return getConstruction("Nothing") val special = SpecialConstruction.getSpecialConstructions().firstOrNull{it.name==constructionName} 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.) val saveCurrentConstruction = currentConstruction - currentConstruction = "lie" + currentConstruction = "" if (!construction.isBuildable(this)) { // 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) Automation().chooseNextConstruction(this) construction = getConstruction(currentConstruction) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index a2c5c33d2e..1c06889f2d 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -174,8 +174,9 @@ class WorldScreen : CameraStageBaseScreen() { val percentageComplete = civInfo.tech.costOfTech(tech) / civInfo.tech.costOfTech(tech).toFloat() // todo techButton.add() + val turnsToTech = civInfo.tech.turnsToTech(tech) 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)) }