From f59102a2a040ba0dbdd2c90d66c48435ecede6f0 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 11 Mar 2018 23:25:57 +0200 Subject: [PATCH] Policy pick and free tech pick moved to when clicking on next turn button --- .../src/com/unciv/ui/worldscreen/WorldScreen.kt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 974799be66..4b1f67bead 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -81,12 +81,6 @@ class WorldScreen : CameraStageBaseScreen() { civTable.update(this) notificationsScroll.update() unitTable.update() - if (civInfo.tech.freeTechs != 0) { - game.screen = TechPickerScreen(true, civInfo) - } else if (civInfo.policies.shouldOpenPolicyPicker) { - game.screen = PolicyPickerScreen(civInfo) - civInfo.policies.shouldOpenPolicyPicker = false - } } private fun updateTechButton() { @@ -109,10 +103,19 @@ class WorldScreen : CameraStageBaseScreen() { private fun createNextTurnButton() { val nextTurnButton = TextButton("Next turn", CameraStageBaseScreen.skin) nextTurnButton.addClickListener { - if (civInfo.tech.currentTechnology() == null && civInfo.cities.isNotEmpty()) { + if (civInfo.tech.freeTechs != 0) { + game.screen = TechPickerScreen(true, civInfo) + return@addClickListener + } else if (civInfo.policies.shouldOpenPolicyPicker) { + game.screen = PolicyPickerScreen(civInfo) + civInfo.policies.shouldOpenPolicyPicker = false + return@addClickListener + } + else if (civInfo.tech.currentTechnology() == null && civInfo.cities.isNotEmpty()) { game.screen = TechPickerScreen(civInfo) return@addClickListener } + game.gameInfo.nextTurn() unitTable.selectedUnitTile = null unitTable.currentlyExecutingAction = null