Fix canImprovementBeBuiltHere regression (#4623)

This commit is contained in:
SomeTroglodyte
2021-07-24 20:45:51 +02:00
committed by GitHub
parent f9bef4a917
commit aa3be63492
2 changed files with 37 additions and 2 deletions

View File

@ -430,9 +430,12 @@ open class TileInfo {
// deprecated as of 3.15.15
"Can only be built on Coastal tiles" in improvement.uniques && isCoastalTile() -> true
//
improvement.uniqueObjects.filter { it.placeholderText == "Can only be built on [] tiles" }.all {
unique -> matchesTerrainFilter(unique.params[0])
// If an unique of this type exists, we want all to match (e.g. Hill _and_ Forest would be meaningful).
improvement.uniqueObjects.filter { it.placeholderText == "Can only be built on [] tiles" }.let {
it.any() && it.all { unique -> matchesTerrainFilter(unique.params[0]) }
} -> true
else -> resourceIsVisible && getTileResource().improvement == improvement.name
}
}