mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 07:16:54 +07:00
improvementFilter accepts uniques as well
This commit is contained in:
parent
bd41630f84
commit
c5c06a2456
@ -83,6 +83,7 @@ class TileImprovement : RulesetStatsObject() {
|
||||
"All" -> true
|
||||
"All Road" -> isRoad()
|
||||
"Great Improvement", "Great" -> isGreatImprovement()
|
||||
in uniques -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
@ -341,7 +341,9 @@ enum class UniqueParameterType(
|
||||
override fun getErrorSeverity(parameterText: String, ruleset: Ruleset):
|
||||
UniqueType.UniqueComplianceErrorSeverity? {
|
||||
if (parameterText in knownValues) return null
|
||||
return ImprovementName.getErrorSeverity(parameterText, ruleset)
|
||||
if (ImprovementName.getErrorSeverity(parameterText, ruleset) == null) return null
|
||||
if (ruleset.tileImprovements.values.any { it.hasUnique(parameterText) }) return null
|
||||
return UniqueType.UniqueComplianceErrorSeverity.RulesetSpecific
|
||||
}
|
||||
override fun isTranslationWriterGuess(parameterText: String, ruleset: Ruleset) =
|
||||
parameterText != "All" && getErrorSeverity(parameterText, ruleset) == null
|
||||
|
Loading…
Reference in New Issue
Block a user