diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 25dadcebe3..8622412eb9 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -233,6 +233,7 @@ 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 { @@ -243,6 +244,11 @@ class Building : NamedStats(), IConstruction { val cityCenter = construction.cityInfo.getCenterTile() val civInfo = construction.cityInfo.civInfo + // This overrides the others + if(uniqueObjects.any { it.placeholderText=="Not displayed as an available construction unless [] is built" + && !construction.containsBuildingOrEquivalent(it.params[0])} ) + return "Should not be displayed" + 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