TerrainFilter parameters accept any unique that exists in terrains. Unrecognized texts now throw errors. - see #6430

This commit is contained in:
Yair Morgenstern 2022-04-19 14:53:58 +03:00
parent de1a1ee48a
commit 9ae84a94e1

View File

@ -250,7 +250,8 @@ enum class UniqueParameterType(
in knownValues -> null
in ruleset.terrains -> null
in ruleset.tileResources -> null
else -> UniqueType.UniqueComplianceErrorSeverity.WarningOnly
in ruleset.terrains.values.asSequence().flatMap { it.uniques } -> null
else -> UniqueType.UniqueComplianceErrorSeverity.RulesetSpecific
}
override fun isTranslationWriterGuess(parameterText: String, ruleset: Ruleset) =
parameterText in ruleset.terrains || parameterText != "All" && parameterText in knownValues