mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 17:59:11 +07:00
And for units as well of course
This commit is contained in:
@ -233,7 +233,6 @@ class Building : NamedStats(), IConstruction {
|
||||
|| rejectionReason.startsWith("Requires")
|
||||
|| rejectionReason.startsWith("Consumes")
|
||||
|| rejectionReason == "Wonder is being built elsewhere"
|
||||
|| rejectionReason == "Should not be displayed"
|
||||
}
|
||||
|
||||
fun getRejectionReason(construction: CityConstructions):String {
|
||||
|
@ -122,6 +122,9 @@ class BaseUnit : INamed, IConstruction {
|
||||
fun getRejectionReason(construction: CityConstructions): String {
|
||||
if (unitType.isWaterUnit() && !construction.cityInfo.getCenterTile().isCoastalTile())
|
||||
return "Can only build water units in coastal cities"
|
||||
if (uniqueObjects.any { it.placeholderText == "Not displayed as an available construction unless [] is built"
|
||||
&& !construction.containsBuildingOrEquivalent(it.params[0]) })
|
||||
return "Should not be displayed"
|
||||
val civRejectionReason = getRejectionReason(construction.cityInfo.civInfo)
|
||||
if (civRejectionReason != "") return civRejectionReason
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user