From 16ea8fe8f0d86ea8c54602df97df13757caa4b13 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 19 Apr 2022 14:14:39 +0300 Subject: [PATCH] Re-added stat values to be a known part of buildingFilter - see #6430 --- .../com/unciv/models/ruleset/unique/UniqueParameterType.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index b45e0d75e4..ab7f5f228e 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -198,13 +198,13 @@ enum class UniqueParameterType( }, BuildingFilter("buildingFilter") { - private val knownValues = setOf("All","Building","Buildings","Wonder","Wonders","National Wonder","World Wonder") + private val knownValues = mutableSetOf("All","Building","Buildings","Wonder","Wonders","National Wonder","World Wonder") + .apply { addAll(Stat.values().map { it.name }) } override fun getErrorSeverity( parameterText: String, ruleset: Ruleset ): UniqueType.UniqueComplianceErrorSeverity? { if (parameterText in knownValues) return null - //if (Stat.values().any { it.name == parameterText }) return null // TODO why was this here if (BuildingName.getErrorSeverity(parameterText, ruleset) == null) return null return UniqueType.UniqueComplianceErrorSeverity.WarningOnly }