mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-07 00:41:39 +07:00
Invisible submarines are excluded from notification.
This commit is contained in:

committed by
Yair Morgenstern

parent
b86d11b5fa
commit
0adeb68ea6
@ -103,12 +103,13 @@ class GameInfo {
|
||||
currentPlayerCiv = getCivilization(currentPlayer)
|
||||
|
||||
// Start our turn immediately before the player can made decisions - affects whether our units can commit automated actions and then be attacked immediately etc.
|
||||
|
||||
val viewableInvisibleTiles = thisPlayer.viewableInvisibleUnitsTiles.map { it.position }
|
||||
val enemyUnitsCloseToTerritory = thisPlayer.viewableTiles
|
||||
.filter {
|
||||
it.militaryUnit != null && it.militaryUnit!!.civInfo != thisPlayer
|
||||
&& thisPlayer.isAtWarWith(it.militaryUnit!!.civInfo)
|
||||
&& (it.getOwner() == thisPlayer || it.neighbors.any { neighbor -> neighbor.getOwner() == thisPlayer })
|
||||
&& (it.getOwner() == thisPlayer || it.neighbors.any { neighbor -> neighbor.getOwner() == thisPlayer }
|
||||
&& (!it.militaryUnit!!.isInvisible() || viewableInvisibleTiles.contains(it.position)))
|
||||
}
|
||||
|
||||
// enemy units ON our territory
|
||||
|
Reference in New Issue
Block a user