From 9ae84a94e1b58e6e970f76d6160f37b5a4ed6e07 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 19 Apr 2022 14:53:58 +0300 Subject: [PATCH] TerrainFilter parameters accept any unique that exists in terrains. Unrecognized texts now throw errors. - see #6430 --- .../src/com/unciv/models/ruleset/unique/UniqueParameterType.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index 6793e3457a..65c1412e87 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -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