diff --git a/android/assets/jsons/Tutorials/Tutorials_English.json b/android/assets/jsons/Tutorials/Tutorials_English.json index d6aad30582..78c5cbc9ca 100644 --- a/android/assets/jsons/Tutorials/Tutorials_English.json +++ b/android/assets/jsons/Tutorials/Tutorials_English.json @@ -286,6 +286,21 @@ ] ] + ConqueredEnemyCity: [ + [ + "You have conquered an enemy city!", + "You can now choose to either or raze, puppet, or annex the city.", + "Razing the city will lower its population by 1 each turn until the city is destroyed." + ], + [ + "Puppeting the city will mean that you have no control on the city's production.", + "The city will not increase your tech or policy cost, but its citizens will generate 1.5x the regular unhappiness.", + "Annexing the city will give you control over the production, but will increase the citizen's unhappiness to 2x!", + "This can be mitigated by building a courthouse in the city, returning the citizen's unhappiness to normal.", + "A puppeted city can be annexed at any time, but annexed vities cannot be returned to a puppeted state!" + ] + ] + BarbarianEncountered: [ [ "You have encountered a barbarian unit!", diff --git a/core/src/com/unciv/logic/automation/ConstructionAutomation.kt b/core/src/com/unciv/logic/automation/ConstructionAutomation.kt index e39b84682f..60f98c9d78 100644 --- a/core/src/com/unciv/logic/automation/ConstructionAutomation.kt +++ b/core/src/com/unciv/logic/automation/ConstructionAutomation.kt @@ -45,7 +45,9 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){ } fun chooseNextConstruction() { - if (!UnCivGame.Current.settings.autoAssignCityProduction && civInfo.playerType== PlayerType.Human) return + if (!UnCivGame.Current.settings.autoAssignCityProduction + && civInfo.playerType== PlayerType.Human && !cityInfo.isPuppet) + return if (cityConstructions.getCurrentConstruction() !is SpecialConstruction) return // don't want to be stuck on these forever addFoodBuildingChoice() diff --git a/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt b/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt index 5f22837170..c82da9c6a9 100644 --- a/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt @@ -88,7 +88,7 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters: } playerIdTable.add(setCurrentUserButton) - val copyFromClipboardButton = TextButton("Player ID from clipboard",CameraStageBaseScreen.skin) + val copyFromClipboardButton = TextButton("Player ID from clipboard".tr(),CameraStageBaseScreen.skin) copyFromClipboardButton.onClick { playerIdTextfield.text = Gdx.app.clipboard.contents onPlayerIdTextUpdated() diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index ef7f7a5f9c..e5e7233e21 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -10,7 +10,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.Constants import com.unciv.UnCivGame -import com.unciv.logic.GameInfo import com.unciv.logic.GameSaver import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.civilization.diplomacy.DiplomaticStatus @@ -155,7 +154,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { // and we don't get any silly concurrency problems! private fun update() { - displayTutorialsOnUpdate(viewingCiv, gameInfo) + displayTutorialsOnUpdate() bottomBar.update(tileMapHolder.selectedTile) // has to come before tilemapholder update because the tilemapholder actions depend on the selected unit! battleTable.update() @@ -196,7 +195,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { updateNextTurnButton() } - private fun displayTutorialsOnUpdate(cloneCivilization: CivilizationInfo, gameClone: GameInfo) { + private fun displayTutorialsOnUpdate() { if (UnCivGame.Current.settings.hasCrashedRecently) { displayTutorials("GameCrashed") UnCivGame.Current.settings.tutorialsShown.remove("GameCrashed") @@ -210,18 +209,20 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { if (!UnCivGame.Current.settings.tutorialsShown.contains("EnemyCityNeedsConqueringWithMeleeUnit")) { - for (enemyCity in cloneCivilization.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War } + for (enemyCity in viewingCiv.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War } .map { it.otherCiv() }.flatMap { it.cities }) { if (enemyCity.health == 1 && enemyCity.getCenterTile().getTilesInDistance(2) - .any { it.getUnits().any { unit -> unit.civInfo == cloneCivilization } }) + .any { it.getUnits().any { unit -> unit.civInfo == viewingCiv} }) displayTutorials("EnemyCityNeedsConqueringWithMeleeUnit") } } + if(viewingCiv.cities.any { it.hasJustBeenConquered }) + displayTutorials("ConqueredEnemyCity") - if (gameClone.getCurrentPlayerCivilization().getCivUnits().any { it.health < 100 }) + if (gameInfo.getCurrentPlayerCivilization().getCivUnits().any { it.health < 100 }) displayTutorials("InjuredUnits") - if (gameClone.getCurrentPlayerCivilization().getCivUnits().any { it.name == Constants.worker }) + if (gameInfo.getCurrentPlayerCivilization().getCivUnits().any { it.name == Constants.worker }) displayTutorials("WorkerTrained") }