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
|
tile.lastTerrain.unbuildable && !improvement.canBeBuiltOnThisUnbuildableTerrain(knownFeatureRemovals) -> false
|
||||||
|
|
||||||
// Can't build if any terrain specifically prevents building this improvement
|
// Can't build if any terrain specifically prevents building this improvement
|
||||||
tile.getTerrainMatchingUniques(UniqueType.RestrictedBuildableImprovements, stateForConditionals).any {
|
tile.getTerrainMatchingUniques(UniqueType.RestrictedBuildableImprovements, stateForConditionals).toList()
|
||||||
unique -> !improvement.matchesFilter(unique.params[0], StateForConditionals(tile = tile))
|
.let { it.any() && it.none {
|
||||||
} -> false
|
unique -> improvement.matchesFilter(unique.params[0], StateForConditionals(tile = tile))
|
||||||
|
} } -> false
|
||||||
|
|
||||||
// Can't build if the improvement specifically prevents building on some present feature
|
// Can't build if the improvement specifically prevents building on some present feature
|
||||||
improvement.getMatchingUniques(UniqueType.CannotBuildOnTile, stateForConditionals).any {
|
improvement.getMatchingUniques(UniqueType.CannotBuildOnTile, stateForConditionals).any {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user