mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
Allow building improvements on terrains that only allow some improvements when it has multiple uniques (#12847)
* Allow building improvements on terrains that only allow some improvements when it has multiple uniques * Whoops, accidentally disallowed all improvements
This commit is contained in:
parent
f5ec43b8f2
commit
9fc2510fe0
@ -149,9 +149,10 @@ class TileImprovementFunctions(val tile: Tile) {
|
||||
tile.lastTerrain.unbuildable && !improvement.canBeBuiltOnThisUnbuildableTerrain(knownFeatureRemovals) -> false
|
||||
|
||||
// Can't build if any terrain specifically prevents building this improvement
|
||||
tile.getTerrainMatchingUniques(UniqueType.RestrictedBuildableImprovements, stateForConditionals).any {
|
||||
unique -> !improvement.matchesFilter(unique.params[0], StateForConditionals(tile = tile))
|
||||
} -> false
|
||||
tile.getTerrainMatchingUniques(UniqueType.RestrictedBuildableImprovements, stateForConditionals).toList()
|
||||
.let { it.any() && it.none {
|
||||
unique -> improvement.matchesFilter(unique.params[0], StateForConditionals(tile = tile))
|
||||
} } -> false
|
||||
|
||||
// Can't build if the improvement specifically prevents building on some present feature
|
||||
improvement.getMatchingUniques(UniqueType.CannotBuildOnTile, stateForConditionals).any {
|
||||
|
Loading…
x
Reference in New Issue
Block a user