mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Resolved #12220 - Changing rulesets in new game screen no longer leads to fake error warnings
This commit is contained in:
parent
9f3f5a3a09
commit
bbd7f68a88
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user