Fixed fresh water adjacency - @HadeanLake
This commit is contained in:
parent
265e6416f9
commit
4844a0e005
2 changed files with 3 additions and 2 deletions
|
@ -309,7 +309,7 @@ open class TileInfo {
|
|||
|
||||
fun fitsUniqueFilter(filter:String): Boolean {
|
||||
return filter == baseTerrain
|
||||
|| (filter == "River" || filter == "Fresh water") && isAdjacentToRiver()
|
||||
|| filter == "River" && isAdjacentToRiver()
|
||||
|| filter == terrainFeature
|
||||
|| baseTerrainObject.uniques.contains(filter)
|
||||
|| terrainFeature != null && getTerrainFeature()!!.uniques.contains(filter)
|
||||
|
|
|
@ -235,7 +235,8 @@ class Building : NamedStats(), IConstruction {
|
|||
for(unique in uniqueObjects) when (unique.placeholderText) {
|
||||
"Must be on []" -> if (!cityCenter.fitsUniqueFilter(unique.params[0])) return unique.text
|
||||
"Must not be on []" -> if (cityCenter.fitsUniqueFilter(unique.params[0])) return unique.text
|
||||
"Must be next to []" -> if (cityCenter.getTilesInDistance(1).none { it.fitsUniqueFilter(unique.params[0]) }) return unique.text
|
||||
"Must be next to []" -> if (!(unique.params[0] == "Fresh water" && cityCenter.isAdjacentToRiver()) // Fresh water is special, in that rivers are not tiles themselves but also fit the filter..
|
||||
&& cityCenter.getTilesInDistance(1).none { it.fitsUniqueFilter(unique.params[0])}) return unique.text
|
||||
"Must not be next to []" -> if (cityCenter.getTilesInDistance(1).any { it.fitsUniqueFilter(unique.params[0]) }) return unique.text
|
||||
"Must have an owned [] within [] tiles" -> if (cityCenter.getTilesInDistance(distance = unique.params[1].toInt()).none {
|
||||
it.fitsUniqueFilter(unique.params[0]) && it.getOwner() == construction.cityInfo.civInfo }) return unique.text
|
||||
|
|
Loading…
Reference in a new issue