From bc16a69bd2909a91cb74bedcb3775d0fc0f5f63f Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 19 Apr 2022 14:17:19 +0300 Subject: [PATCH] baseUnitFilter accepts all uniques that exist on units - see #6430 --- core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index ab7f5f228e..b2fd142feb 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -72,6 +72,7 @@ enum class UniqueParameterType( override fun getErrorSeverity(parameterText: String, ruleset: Ruleset): UniqueType.UniqueComplianceErrorSeverity? { if (UnitName.getErrorSeverity(parameterText, ruleset) == null) return null + if (ruleset.units.values.any { it.uniques.contains(parameterText) }) return null return UnitTypeFilter.getErrorSeverity(parameterText, ruleset) } },