mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fixed tests
This commit is contained in:
parent
45b43849bd
commit
a27a28df67
@ -308,7 +308,8 @@ class DiplomacyManager() {
|
|||||||
|
|
||||||
// for performance reasons we don't want to call this every time we want to see if a unit can move through a tile
|
// for performance reasons we don't want to call this every time we want to see if a unit can move through a tile
|
||||||
fun updateHasOpenBorders() {
|
fun updateHasOpenBorders() {
|
||||||
val newHasOpenBorders = civInfo.getAllyCiv() == otherCivName || otherCiv().getAllyCiv() == civInfo.civName
|
// City-states can enter ally's territory (the opposite is true anyway even without open borders)
|
||||||
|
val newHasOpenBorders = civInfo.getAllyCiv() == otherCivName
|
||||||
|| trades.flatMap { it.theirOffers }.any { it.name == Constants.openBorders && it.duration > 0 }
|
|| trades.flatMap { it.theirOffers }.any { it.name == Constants.openBorders && it.duration > 0 }
|
||||||
|
|
||||||
val bordersWereClosed = hasOpenBorders && !newHasOpenBorders
|
val bordersWereClosed = hasOpenBorders && !newHasOpenBorders
|
||||||
|
Loading…
x
Reference in New Issue
Block a user