Era-specific city tiles for Ancient, Classical and Medieval
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 500 KiB After Width: | Height: | Size: 500 KiB |
@ -138,16 +138,22 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
|
||||
fun getTileBaseImageLocations(viewingCiv: CivilizationInfo?): List<String>{
|
||||
if (viewingCiv==null && !showEntireMap) return listOf(tileSetStrings.hexagon)
|
||||
|
||||
val shouldShowImprovement = tileInfo.improvement!=null && UncivGame.Current.settings.showPixelImprovements
|
||||
val shouldShowResource = UncivGame.Current.settings.showPixelImprovements
|
||||
&& tileInfo.resource!=null &&
|
||||
(showEntireMap || viewingCiv==null || tileInfo.hasViewableResource(viewingCiv))
|
||||
val baseTerrainTileLocation = tileSetStrings.getTile(tileInfo.baseTerrain) // e.g. Grassland
|
||||
|
||||
|
||||
if (tileInfo.isCityCenter()) {
|
||||
// Temporarily disabled until we can see the rivers behind the era cities =)
|
||||
// val era = tileInfo.getOwner()!!.getEra()
|
||||
// val terrainAndCityWithEra = tileSetStrings.getCityTile(tileInfo.baseTerrain, era)
|
||||
// if (ImageGetter.imageExists(terrainAndCityWithEra))
|
||||
// return listOf(terrainAndCityWithEra)
|
||||
//
|
||||
// val cityWithEra = tileSetStrings.getCityTile(null, era)
|
||||
// if (ImageGetter.imageExists(cityWithEra))
|
||||
// return listOf(cityWithEra)
|
||||
val era = tileInfo.getOwner()!!.getEra()
|
||||
val terrainAndCityWithEra = tileSetStrings.getCityTile(tileInfo.baseTerrain, era)
|
||||
if (ImageGetter.imageExists(terrainAndCityWithEra))
|
||||
return listOf(terrainAndCityWithEra)
|
||||
|
||||
val cityWithEra = tileSetStrings.getCityTile(null, era)
|
||||
if (ImageGetter.imageExists(cityWithEra))
|
||||
return listOf(baseTerrainTileLocation, cityWithEra)
|
||||
|
||||
val terrainAndCity = tileSetStrings.getCityTile(tileInfo.baseTerrain, null)
|
||||
if (ImageGetter.imageExists(terrainAndCity))
|
||||
@ -166,12 +172,6 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
|
||||
}
|
||||
|
||||
|
||||
val shouldShowImprovement = tileInfo.improvement!=null && UncivGame.Current.settings.showPixelImprovements
|
||||
val shouldShowResource = UncivGame.Current.settings.showPixelImprovements
|
||||
&& tileInfo.resource!=null &&
|
||||
(showEntireMap || viewingCiv==null || tileInfo.hasViewableResource(viewingCiv))
|
||||
val baseTerrainTileLocation = tileSetStrings.getTile(tileInfo.baseTerrain) // e.g. Grassland
|
||||
|
||||
if (tileInfo.terrainFeature != null) {
|
||||
// e.g. Grassland+Forest
|
||||
val baseTerrainAndFeatureTileLocation = "$baseTerrainTileLocation+${tileInfo.terrainFeature}"
|
||||
|
@ -54,7 +54,7 @@ class TileSetStrings {
|
||||
fun getTerrainFeatureOverlay(terrainFeature: String) = getString(tileSetLocation, terrainFeature, overlay)
|
||||
|
||||
fun getCityTile(baseTerrain: String?, era: String?): String {
|
||||
if (baseTerrain != null && era != null) getString(tilesLocation, baseTerrain, city, tag, era)
|
||||
if (baseTerrain != null && era != null) return getString(tilesLocation, baseTerrain, city, tag, era)
|
||||
if (era != null) return getString(tilesLocation, city, tag, era)
|
||||
if (baseTerrain != null) return getString(tilesLocation, baseTerrain, "+", city)
|
||||
else return cityTile
|
||||
|