Base image tiles on tiles with improvement images are now grayed out when not visible

This commit is contained in:
Yair Morgenstern
2019-11-16 21:15:33 +02:00
parent 6523d4f124
commit a48c356920
5 changed files with 145 additions and 149 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -215,7 +215,7 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
hideCircle()
if (viewingCiv != null && !showEntireMap
&& !viewingCiv.exploredTiles.contains(tileInfo.position)) {
tileBaseImages.firstOrNull()?.color = Color.DARK_GRAY
for(image in tileBaseImages) image.color = Color.DARK_GRAY
return
}
@ -388,7 +388,7 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
else tileInfo.getBaseTerrain().getColor()
if (!isViewable) color =color.cpy().lerp(Color.BLACK, 0.6f)
tileBaseImages.firstOrNull()?.color = color
for(image in tileBaseImages) image.color = color
}
private fun updateTerrainFeatureImage() {

View File

@ -36,17 +36,6 @@ class WorldTileGroup(internal val worldScreen: WorldScreen, tileInfo: TileInfo,
updateCityButton(city, tileIsViewable || UnCivGame.Current.viewEntireMapForDebug) // needs to be before the update so the units will be above the city button
super.update(viewingCiv, UnCivGame.Current.settings.showResourcesAndImprovements)
// order by z index!
cityImage?.toFront()
terrainFeatureOverlayImage?.toFront()
icons.improvementIcon?.toFront()
resourceImage?.toFront()
cityButton?.toFront()
icons.civilianUnitIcon?.toFront()
icons.militaryUnitIcon?.toFront()
fogImage.toFront()
}