From 665af17ae5b8b40147c65d13974acd14855f6058 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sat, 26 Jan 2019 22:00:48 +0200 Subject: [PATCH] Fixed #438 - changing production before answering the "do you want to purchase construction" popup lead to buying the newly chosen production --- core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt | 2 +- core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt index 11cd3c9c9a..8fe935a7e2 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt @@ -128,7 +128,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre purchaseConstructionButton = TextButton("Buy for [$buildingGoldCost] gold".tr(), CameraStageBaseScreen.skin) purchaseConstructionButton.onClick("coin") { YesNoPopupTable("Would you like to purchase [${construction.name}] for [$buildingGoldCost] gold?".tr(), { - city.cityConstructions.purchaseBuilding(city.cityConstructions.currentConstruction) + city.cityConstructions.purchaseBuilding(construction.name) update() }, cityScreen) } diff --git a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt index 0bbd86301d..a54ef4fcab 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt @@ -50,7 +50,6 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen() techMatrix[technology.column!!.columnNumber][technology.row - 1] = technology } - val alreadyDisplayedEras = HashSet() val eras = ArrayList