Modded water units with worker unique can no longer build roads in water

This commit is contained in:
Yair Morgenstern
2020-12-26 19:50:29 +02:00
parent 099ee879cc
commit b77fa8d67d
2 changed files with 3 additions and 3 deletions

View File

@ -319,8 +319,8 @@ open class TileInfo {
if (filter == "River") return@any !isAdjacentToRiver()
else return@any !neighbors.any { it.matchesUniqueFilter(filter) }
} -> false
improvement.name == "Road" && roadStatus == RoadStatus.None -> true
improvement.name == "Railroad" && this.roadStatus != RoadStatus.Railroad -> true
improvement.name == "Road" && roadStatus == RoadStatus.None && !isWater -> true
improvement.name == "Railroad" && this.roadStatus != RoadStatus.Railroad && !isWater -> true
improvement.name == "Remove Road" && this.roadStatus == RoadStatus.Road -> true
improvement.name == "Remove Railroad" && this.roadStatus == RoadStatus.Railroad -> true
improvement.name == Constants.cancelImprovementOrder && this.improvementInProgress != null -> true

View File

@ -188,7 +188,7 @@ class Building : NamedStats(), IConstruction {
}
override fun canBePurchased(): Boolean {
return !isWonder && !isNationalWonder && ("Cannot be purchased" !in uniques)
return !isWonder && !isNationalWonder && "Cannot be purchased" !in uniques
}