mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Added empty hexagon when none of the images exist - this fixes the default tileset for the new rendering method
This commit is contained in:
parent
39439f72a2
commit
f4da05eb05
@ -347,7 +347,7 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings,
|
|||||||
if (!ImageGetter.imageExists(baseLocation)) continue
|
if (!ImageGetter.imageExists(baseLocation)) continue
|
||||||
|
|
||||||
var locationToCheck = baseLocation
|
var locationToCheck = baseLocation
|
||||||
if(tileInfo.owningCity!=null) {
|
if (tileInfo.owningCity != null) {
|
||||||
val ownersEra = tileInfo.getOwner()!!.getEra()
|
val ownersEra = tileInfo.getOwner()!!.getEra()
|
||||||
val eraSpecificLocation = tileSetStrings.getString(locationToCheck, tileSetStrings.tag, ownersEra)
|
val eraSpecificLocation = tileSetStrings.getString(locationToCheck, tileSetStrings.tag, ownersEra)
|
||||||
if (ImageGetter.imageExists(eraSpecificLocation))
|
if (ImageGetter.imageExists(eraSpecificLocation))
|
||||||
@ -371,6 +371,13 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings,
|
|||||||
setHexagonImageSize(image)
|
setHexagonImageSize(image)
|
||||||
image.toBack()
|
image.toBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tileBaseImages.isEmpty()) { // Absolutely nothing! This is for the 'default' tileset
|
||||||
|
val image = ImageGetter.getImage(tileSetStrings.hexagon)
|
||||||
|
tileBaseImages.add(image)
|
||||||
|
baseLayerGroup.addActor(image)
|
||||||
|
setHexagonImageSize(image)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun showMilitaryUnit(viewingCiv: CivilizationInfo) = showEntireMap
|
fun showMilitaryUnit(viewingCiv: CivilizationInfo) = showEntireMap
|
||||||
|
Loading…
x
Reference in New Issue
Block a user