terrainFilter now accommodates nationFilter for owner

This commit is contained in:
Yair Morgenstern
2023-04-25 17:35:08 +03:00
parent 2b57bd44ab
commit 079c237547
2 changed files with 11 additions and 17 deletions

View File

@ -535,9 +535,11 @@ open class Tile : IsPartOfGameInfoSerialization {
"Natural Wonder" -> naturalWonder != null
"Featureless" -> terrainFeatures.isEmpty()
Constants.freshWaterFilter -> isAdjacentTo(Constants.freshWater)
in terrainFeatures -> true
else -> {
if (terrainFeatures.contains(filter)) return true
if (terrainUniqueMap.getUniques(filter).any()) return true
if (getOwner()?.nation?.matchesFilter(filter) == true) return true
// Resource type check is last - cannot succeed if no resource here
if (resource == null) return false