Resolved #12220 - Changing rulesets in new game screen no longer leads to fake error warnings

This commit is contained in:
yairm210 2024-09-17 20:17:10 +03:00
parent 9f3f5a3a09
commit bbd7f68a88

View File

@ -618,8 +618,8 @@ enum class UniqueParameterType(
* - [getErrorSeverity] takes precedence and chooses whether to call this or not.
* - This means [getErrorSeverity] or [isKnownValue] ***must*** be overridden or else the UniqueParameterType is never valid.
*/
open fun isKnownValue(parameterText: String, ruleset: Ruleset): Boolean = knownValuesCache.getOrPut(ruleset) { getKnownValuesForAutocomplete(ruleset) }.contains(parameterText)
open val knownValuesCache: HashMap<Ruleset, Set<String>> = HashMap()
open fun isKnownValue(parameterText: String, ruleset: Ruleset): Boolean =
getKnownValuesForAutocomplete(ruleset).contains(parameterText)
/** This returns the known values *for autocomplete* -
* there may be 'known values' not in this set, for example uniques.