Tile info table no longer reveals hidden units - see #7670

This commit is contained in:
Yair Morgenstern 2022-11-16 22:53:08 +02:00
parent 45ea73379d
commit 4dca183635

View File

@ -1000,7 +1000,7 @@ open class TileInfo : IsPartOfGameInfoSerialization {
if (civilianUnit != null && isViewableToPlayer)
lineList += FormattedLine(civilianUnit!!.name.tr() + " - " + civilianUnit!!.civInfo.civName.tr(),
link="Unit/${civilianUnit!!.name}")
if (militaryUnit != null && isViewableToPlayer) {
if (militaryUnit != null && isViewableToPlayer && (viewingCiv == null || !militaryUnit!!.isInvisible(viewingCiv))) {
val milUnitString = militaryUnit!!.name.tr() +
(if (militaryUnit!!.health < 100) "(" + militaryUnit!!.health + ")" else "") +
" - " + militaryUnit!!.civInfo.civName.tr()