From 9870003e337d9d6f1afe7e70774ef594e788edbb Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Mon, 28 Feb 2022 18:41:35 +0100 Subject: [PATCH] Fix Petra and Garden not allowed in some cases (#6245) --- core/src/com/unciv/logic/map/TileInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index ba909af80f..eb347ff4a0 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -493,7 +493,7 @@ open class TileInfo { // Rivers are odd, as they aren't technically part of any specific tile but still count towards adjacency if (terrainFilter == "River") return isAdjacentToRiver() if (terrainFilter == Constants.freshWater && isAdjacentToRiver()) return true - return neighbors.any { neighbor -> neighbor.matchesFilter(terrainFilter) } + return (neighbors + this).any { neighbor -> neighbor.matchesFilter(terrainFilter) } } /** Without regards to what CivInfo it is, a lot of the checks are just for the improvement on the tile.