Fix Petra and Garden not allowed in some cases (#6245)

This commit is contained in:
SomeTroglodyte 2022-02-28 18:41:35 +01:00 committed by GitHub
parent 651dcff581
commit 9870003e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.