From 713ee08bf9350ac32da638953472a19afb7b7dca Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 3 Jun 2020 19:26:39 +0300 Subject: [PATCH] Buildings requiring a nearby resource can be constructed even when the tile belongs to another city --- core/src/com/unciv/logic/city/CityInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 7d01afd8c0..ee0d7669df 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -136,7 +136,7 @@ class CityInfo { fun getCenterTile(): TileInfo = centerTileInfo fun getTiles(): Sequence = tiles.asSequence().map { tileMap[it] } - fun getWorkableTiles() = getTiles().filter { it in tilesInRange } + fun getWorkableTiles() = tilesInRange.asSequence().filter { it.getOwner() == civInfo } fun isCapital() = cityConstructions.isBuilt("Palace") fun isConnectedToCapital(connectionTypePredicate: (Set) -> Boolean = {true}): Boolean {