From 28fc6a014c4e9b6a023e32fef0a127043bf78be9 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Mon, 8 Jul 2024 17:25:10 +0300 Subject: [PATCH] Allow purchasing air units whenever they can be built --- core/src/com/unciv/logic/city/City.kt | 2 +- .../com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/city/City.kt b/core/src/com/unciv/logic/city/City.kt index 98ac53fba6..4e501744a8 100644 --- a/core/src/com/unciv/logic/city/City.kt +++ b/core/src/com/unciv/logic/city/City.kt @@ -420,7 +420,7 @@ class City : IsPartOfGameInfoSerialization, INamed { val tile = getCenterTile() return when { construction.isCivilian() -> tile.civilianUnit == null - construction.movesLikeAirUnits -> tile.airUnits.count { !it.isTransported } < 6 + construction.movesLikeAirUnits -> return true // Dealt with in MapUnit.getRejectionReasons else -> tile.militaryUnit == null } } diff --git a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt index 209f9fb257..9ca112ae94 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt @@ -741,7 +741,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { constructionBuyCost == 0 -> true else -> city.getStatReserve(stat) >= constructionBuyCost } -} + } /** Called only by askToBuyConstruction's Yes answer - not to be confused with [CityConstructions.purchaseConstruction] * @param tile supports [UniqueType.CreatesOneImprovement]