From e5e52fe916da40f046374e8ec28183131ee34679 Mon Sep 17 00:00:00 2001 From: SeventhM <127357473+SeventhM@users.noreply.github.com> Date: Thu, 27 Jun 2024 13:26:38 -0700 Subject: [PATCH] Pass in civ for building on tiles (#11861) --- core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt b/core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt index 4d60a2607c..fe1a3ebd30 100644 --- a/core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt +++ b/core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt @@ -157,14 +157,14 @@ class TileImprovementFunctions(val tile: Tile) { // Can't build if the improvement specifically prevents building on some present feature improvement.getMatchingUniques(UniqueType.CannotBuildOnTile, stateForConditionals).any { - unique -> tile.matchesTerrainFilter(unique.params[0]) + unique -> tile.matchesFilter(unique.params[0], stateForConditionals.civInfo) } -> false // Can't build if an improvement is only allowed to be built on specific tiles and this is not one of them // If multiple uniques of this type exists, we want all to match (e.g. Hill _and_ Forest would be meaningful) improvement.getMatchingUniques(UniqueType.CanOnlyBeBuiltOnTile, stateForConditionals).let { - it.any() && it.any { unique -> !tile.matchesTerrainFilter(unique.params[0]) } + it.any() && it.any { unique -> !tile.matchesFilter(unique.params[0], stateForConditionals.civInfo) } } -> false // Can't build if the improvement requires an adjacent terrain that is not present