diff --git a/core/src/com/unciv/logic/map/tile/Tile.kt b/core/src/com/unciv/logic/map/tile/Tile.kt index 3bb53ff16e..7bd2697463 100644 --- a/core/src/com/unciv/logic/map/tile/Tile.kt +++ b/core/src/com/unciv/logic/map/tile/Tile.kt @@ -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 diff --git a/docs/Modders/Unique-parameters.md b/docs/Modders/Unique-parameters.md index 89a04b52cc..ecb1cad2bd 100644 --- a/docs/Modders/Unique-parameters.md +++ b/docs/Modders/Unique-parameters.md @@ -61,7 +61,7 @@ Allows filtering for specific nations. - `City-states` - `Major` - Nation name -- Nation unique +- A unique a Nation has (verbatim, no placeholders) ## cityFilter @@ -96,15 +96,6 @@ Allowed values are: - `Great Improvements`, `Great` - `All Road` - for Roads & Railroads -## nationFilter - -Allowed values are: - -- `All` -- `Major` -- `CityState` -- The name of a Nation -- A unique a Nation has (verbatim, no placeholders) ## mapUnitFilter @@ -170,12 +161,13 @@ Allowed values are: This indicates the terrain on a single tile. The following values are allowed: - A filter names a specific json attribute (by name): - - Base terrain - - Terrain features - - Base terrain uniques - - Terrain feature uniques - - Resource - - Natural wonder + - Base terrain + - Terrain features + - Base terrain uniques + - Terrain feature uniques + - Resource + - Natural wonder + - A [nationFilter](#nationfilter) matching the tile owner - Or the filter is a constant string choosing a derived test: - `All` - `Water`, `Land`