diff --git a/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json b/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json index b77eae7cc0..f8c6da8c29 100644 --- a/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json +++ b/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json @@ -846,7 +846,7 @@ } "Augustus Caesar":{ - Italian:"Cesare Augusto"Harun al-Rashid + Italian:"Cesare Augusto" } "+25% Production towards any buildings that already exist in the Capital":{ diff --git a/core/src/com/unciv/GameSettings.kt b/core/src/com/unciv/GameSettings.kt index 5e2305751f..53339c1942 100644 --- a/core/src/com/unciv/GameSettings.kt +++ b/core/src/com/unciv/GameSettings.kt @@ -15,6 +15,7 @@ class GameSettings { var turnsBetweenAutosaves = 1 var tileSet:String = "FantasyHex" var showTutorials: Boolean = true + var autoAssignCityProduction: Boolean = true fun save(){ GameSaver().setGeneralSettings(this) diff --git a/core/src/com/unciv/logic/automation/Automation.kt b/core/src/com/unciv/logic/automation/Automation.kt index 0f7c4f6956..7cbc12827d 100644 --- a/core/src/com/unciv/logic/automation/Automation.kt +++ b/core/src/com/unciv/logic/automation/Automation.kt @@ -2,6 +2,7 @@ package com.unciv.logic.automation import com.badlogic.gdx.graphics.Color import com.unciv.Constants +import com.unciv.UnCivGame import com.unciv.logic.battle.CityCombatant import com.unciv.logic.city.CityConstructions import com.unciv.logic.city.CityInfo @@ -85,6 +86,7 @@ class Automation { fun chooseNextConstruction(cityConstructions: CityConstructions) { cityConstructions.run { + if(!UnCivGame.Current.settings.autoAssignCityProduction) return if (getCurrentConstruction() !is SpecialConstruction) return // don't want to be stuck on these forever val buildableNotWonders = getBuildableBuildings().filterNot { it.isWonder || it.isNationalWonder } diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index d2e949c68b..ea21a41d75 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -57,7 +57,8 @@ class CityConstructions { fun getCityProductionTextForCityButton(): String { val currentConstructionSnapshot = currentConstruction // See below var result = currentConstructionSnapshot .tr() - if (SpecialConstruction.getSpecialConstructions().none { it.name==currentConstructionSnapshot }) + if (currentConstructionSnapshot!="" + && SpecialConstruction.getSpecialConstructions().none { it.name==currentConstructionSnapshot }) result += "\r\n" + turnsToConstruction(currentConstructionSnapshot ) + " {turns}".tr() return result } @@ -65,7 +66,8 @@ class CityConstructions { fun getProductionForTileInfo(): String { val currentConstructionSnapshot = currentConstruction // this is because there were rare errors tht I assume were caused because currentContruction changed on another thread var result = currentConstructionSnapshot.tr() - if (SpecialConstruction.getSpecialConstructions().none { it.name==currentConstructionSnapshot }) + if (currentConstructionSnapshot!="" + && SpecialConstruction.getSpecialConstructions().none { it.name==currentConstructionSnapshot }) result += "\r\n{in} ".tr() + turnsToConstruction(currentConstructionSnapshot) + " {turns}".tr() return result } diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt index aae1728466..88d1a4f94b 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt @@ -20,6 +20,19 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre var constructionScrollPane:ScrollPane?=null var lastConstruction = "" + + fun update() { + val city = cityScreen.city + pad(10f) + columnDefaults(0).padRight(10f) + clear() + + addConstructionPickerScrollpane(city) + addCurrentConstructionTable(city) + + pack() + } + private fun getProductionButton(construction: String, buttonText: String, rejectionReason: String=""): Table { val pickProductionButton = Table() pickProductionButton.touchable = Touchable.enabled @@ -54,18 +67,6 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre return pickProductionButton } - fun update() { - val city = cityScreen.city - pad(10f) - columnDefaults(0).padRight(10f) - clear() - - addConstructionPickerScrollpane(city) - addCurrentConstructionTable(city) - - pack() - } - private fun Table.addCategory(title:String,list:ArrayList