No longer get notifications for units of other friendly civs around your territory

This commit is contained in:
Yair Morgenstern 2018-08-07 09:04:35 +03:00
parent 3b83627386
commit c35f7d68f2

View file

@ -51,7 +51,9 @@ class GameInfo {
player.startTurn()
val enemyUnitsCloseToTerritory = player.getViewableTiles().filter { it.militaryUnit!=null && it.militaryUnit!!.civInfo!=player
val enemyUnitsCloseToTerritory = player.getViewableTiles()
.filter { it.militaryUnit!=null && it.militaryUnit!!.civInfo!=player
&& player.isAtWarWith(it.militaryUnit!!.civInfo)
&& (it.getOwner()==player || it.neighbors.any { neighbor -> neighbor.getOwner()==player }) }
for(enemyUnitTile in enemyUnitsCloseToTerritory) {
val inOrNear = if(enemyUnitTile.getOwner()==player) "in" else "near"