diff --git a/core/src/com/unciv/ui/tilegroups/TileGroup.kt b/core/src/com/unciv/ui/tilegroups/TileGroup.kt index d5b8a7b322..f614da800b 100644 --- a/core/src/com/unciv/ui/tilegroups/TileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/TileGroup.kt @@ -616,8 +616,8 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings) if (terrainFeatureOverlayImage != null) terrainFeatureOverlayImage!!.remove() terrainFeatureOverlayImage = null - if (terrainFeatures.isNotEmpty()) { - val terrainFeatureOverlayLocation = tileSetStrings.getTerrainFeatureOverlay(terrainFeatures) + for (terrainFeature in terrainFeatures) { + val terrainFeatureOverlayLocation = tileSetStrings.getTerrainFeatureOverlay(terrainFeature) if (!ImageGetter.imageExists(terrainFeatureOverlayLocation)) return terrainFeatureOverlayImage = ImageGetter.getImage(terrainFeatureOverlayLocation) terrainFeatureLayerGroup.addActor(terrainFeatureOverlayImage) diff --git a/core/src/com/unciv/ui/tilegroups/TileSetStrings.kt b/core/src/com/unciv/ui/tilegroups/TileSetStrings.kt index ab7d6aed09..3ca9a1884f 100644 --- a/core/src/com/unciv/ui/tilegroups/TileSetStrings.kt +++ b/core/src/com/unciv/ui/tilegroups/TileSetStrings.kt @@ -51,16 +51,7 @@ class TileSetStrings { val tag = "-" fun getTile(baseTerrain: String) = getString(tilesLocation, baseTerrain) fun getBaseTerrainOverlay(baseTerrain: String) = getString(tileSetLocation, baseTerrain, overlay) - fun getTerrainFeatureOverlay(terrainFeatures: Collection): String { - val iterator = terrainFeatures.iterator() - val out = Array(terrainFeatures.size * 2 - 1){ //"+" gets added in front of each element except the first hence * 2 - 1 - if (it % 2 == 0) - iterator.next() - else - "+" - } - return getString(tileSetLocation, *out, overlay) - } + fun getTerrainFeatureOverlay(terrainFeature: String) = getString(tileSetLocation, terrainFeature, overlay) fun getCityTile(baseTerrain: String?, era: String?): String { if (baseTerrain != null && era != null) return getString(tilesLocation, baseTerrain, city, tag, era)