diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 574a5bdcb8..30655f67fe 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -42,7 +42,8 @@ class CityStats { private fun getStatsFromTiles(): Stats { val stats = Stats() for (cell in cityInfo.tilesInRange - .filter { cityInfo.location == it.position || cityInfo.isWorked(it) }) + .filter { cityInfo.location == it.position || cityInfo.isWorked(it) || + it.getTileImprovement()?.hasUnique("Provides yield without assigned population")==true && it.owningCity == cityInfo }) stats.add(cell.getTileStats(cityInfo, cityInfo.civInfo)) return stats } diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 074f950175..771bea5893 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -219,7 +219,8 @@ open class TileInfo { } fun isWorked(): Boolean = getWorkingCity() != null - fun providesYield() = getCity() != null && (isCityCenter() || isWorked()) + fun providesYield() = getCity() != null && (isCityCenter() || isWorked() + || getTileImprovement()?.hasUnique("Provides yield without assigned population")==true) fun isLocked(): Boolean { val workingCity = getWorkingCity() diff --git a/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt b/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt index 10ebcd677a..63763009b9 100644 --- a/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt +++ b/core/src/com/unciv/ui/cityscreen/CityTileGroup.kt @@ -18,8 +18,7 @@ class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo, tileSetStrin isTransform = false // performance helper - nothing here is rotated or scaled addActor(yieldGroup) if (city.location == tileInfo.position) { - icons.addPopulationIcon(ImageGetter.getImage("OtherIcons/Star") - .apply { color = Color.GOLD }) + icons.addPopulationIcon(ImageGetter.getImage("OtherIcons/Star")) } unitLayerGroup.isVisible = false unitImageLayerGroup.isVisible = false @@ -50,7 +49,7 @@ class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo, tileSetStrin icons.addPopulationIcon(ImageGetter.getImage("OtherIcons/Lock")) } - !tileInfo.isCityCenter() -> { // workable + tileInfo.isWorked() || !tileInfo.providesYield() -> { // workable icons.addPopulationIcon() isWorkable = true } @@ -85,8 +84,9 @@ class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo, tileSetStrin populationIcon.setPosition(width / 2 - populationIcon.width / 2, height * 0.85f - populationIcon.height / 2) - if (tileInfo.providesYield()) populationIcon.color = Color.WHITE - else populationIcon.color = Color.GRAY.cpy() + if (tileInfo.isCityCenter()) populationIcon.color = Color.GOLD + else if (tileInfo.providesYield()) populationIcon.color = Color.WHITE + else populationIcon.color = Color.GRAY.cpy() // City center gets a GOLD star populationIcon.toFront() }