Resolved #12649 - buy button active for puppets when civ can purchase items in puppets

This commit is contained in:
yairm210 2024-12-15 11:27:20 +02:00
parent ded0037194
commit 4bac39c910

View File

@ -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"
}