From 4bac39c91010398d5204a22becdc4d06fe176192 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Sun, 15 Dec 2024 11:27:20 +0200 Subject: [PATCH] Resolved #12649 - buy button active for puppets when civ can purchase items in puppets --- core/src/com/unciv/ui/screens/cityscreen/BuyButtonFactory.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/screens/cityscreen/BuyButtonFactory.kt b/core/src/com/unciv/ui/screens/cityscreen/BuyButtonFactory.kt index 2057050c4b..7c3f6e7c63 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/BuyButtonFactory.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/BuyButtonFactory.kt @@ -76,7 +76,8 @@ class BuyButtonFactory(val cityScreen: CityScreen) { button.disable() buyButtonOnClick(construction, stat) } - button.isEnabled = cityScreen.canCityBeChanged() && + // allow puppets, since isConstructionPurchaseAllowed handles that and exceptions to that rule + button.isEnabled = cityScreen.canChangeState && city.cityConstructions.isConstructionPurchaseAllowed(construction, stat, constructionBuyCost) preferredBuyStat = stat // Not very intelligent, but the least common currency "wins" }