From c35f7d68f2b418fbeff5a6ce69e6ca2d5095491f Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 7 Aug 2018 09:04:35 +0300 Subject: [PATCH] No longer get notifications for units of other friendly civs around your territory --- core/src/com/unciv/logic/GameInfo.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index 68675d70..3163ade2 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -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"