diff --git a/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt b/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt index 0f1152b494..596cd2ac0d 100644 --- a/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityInfoTable.kt @@ -139,6 +139,14 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS unifiedStatList[entry.key]!!.happiness=entry.value } + // Add maintenance if relevant + + val maintenance = cityStats.cityInfo.cityConstructions.getMaintenanceCosts() + if(maintenance>0) + unifiedStatList["Maintenance"]=Stats().add(Stat.Gold,-maintenance.toFloat()) + + + for(stat in Stat.values()){ if(unifiedStatList.all { it.value.get(stat)==0f }) continue @@ -157,13 +165,6 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS val decimal = DecimalFormat("0.#").format(specificStatValue) statValuesTable.add("+$decimal%".toLabel()).row() } - if(stat==Stat.Gold){ - val maintenance = cityStats.cityInfo.cityConstructions.getMaintenanceCosts() - if(maintenance>0){ - statValuesTable.add("Maintenance".toLabel()) - statValuesTable.add("-$maintenance".toLabel()) - } - } if(stat==Stat.Food){ statValuesTable.add("Food eaten".toLabel()) statValuesTable.add(("-"+DecimalFormat("0.#").format(cityStats.foodEaten)).toLabel()).row()