diff --git a/core/src/com/unciv/models/ruleset/RulesetCache.kt b/core/src/com/unciv/models/ruleset/RulesetCache.kt index 72d43b33e5..9c998bfc22 100644 --- a/core/src/com/unciv/models/ruleset/RulesetCache.kt +++ b/core/src/com/unciv/models/ruleset/RulesetCache.kt @@ -16,9 +16,6 @@ import com.unciv.utils.debug * save all of the loaded rulesets somewhere for later use * */ object RulesetCache : HashMap() { - /** Whether mod checking allows untyped uniques - set to `false` once all vanilla uniques are converted! */ - var modCheckerAllowUntypedUniques = true - /** Similarity below which an untyped unique can be considered a potential misspelling. * Roughly corresponds to the fraction of the Unique placeholder text that can be different/misspelled, but with some extra room for [getRelativeTextDistance] idiosyncrasies. */ var uniqueMisspellingThreshold = 0.15 // Tweak as needed. Simple misspellings seem to be around 0.025, so would mostly be caught by 0.05. IMO 0.1 would be good, but raising to 0.15 also seemed to catch what may be an outdated Unique. diff --git a/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt b/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt index 4ab4de321c..0e04227f40 100644 --- a/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt +++ b/core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt @@ -755,11 +755,9 @@ class RulesetValidator(val ruleset: Ruleset) { if (fixes.isNotEmpty()) return fixes } - if (RulesetCache.modCheckerAllowUntypedUniques) return emptyList() - return listOf(RulesetError( "$prefix unique \"${unique.text}\" not found in Unciv's unique types.", - RulesetErrorSeverity.WarningOptionsOnly)) + RulesetErrorSeverity.OK)) } private fun isFilteringUniqueAllowed(unique: Unique): Boolean { diff --git a/core/src/com/unciv/ui/popups/options/DebugTab.kt b/core/src/com/unciv/ui/popups/options/DebugTab.kt index 193bdefb00..1071d11971 100644 --- a/core/src/com/unciv/ui/popups/options/DebugTab.kt +++ b/core/src/com/unciv/ui/popups/options/DebugTab.kt @@ -3,17 +3,17 @@ package com.unciv.ui.popups.options import com.badlogic.gdx.scenes.scene2d.ui.Table import com.unciv.GUI import com.unciv.UncivGame -import com.unciv.logic.files.UncivFiles import com.unciv.logic.files.MapSaver +import com.unciv.logic.files.UncivFiles import com.unciv.models.ruleset.RulesetCache import com.unciv.models.ruleset.tile.ResourceType -import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.ui.components.UncivSlider import com.unciv.ui.components.UncivTextField -import com.unciv.ui.components.input.onClick import com.unciv.ui.components.extensions.toCheckBox import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.extensions.toTextButton +import com.unciv.ui.components.input.onClick +import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.utils.DebugUtils fun debugTab( @@ -80,10 +80,6 @@ fun debugTab( BaseScreen.enableSceneDebug = it }).colspan(2).row() - add("Allow untyped Uniques in mod checker".toCheckBox(RulesetCache.modCheckerAllowUntypedUniques) { - RulesetCache.modCheckerAllowUntypedUniques = it - }).colspan(2).row() - add(Table().apply { add("Unique misspelling threshold".toLabel()).left().fillX() add( diff --git a/tests/src/com/unciv/testing/BasicTests.kt b/tests/src/com/unciv/testing/BasicTests.kt index d09e1cc9e8..bed615928d 100644 --- a/tests/src/com/unciv/testing/BasicTests.kt +++ b/tests/src/com/unciv/testing/BasicTests.kt @@ -91,7 +91,6 @@ class BasicTests { @Test fun baseRulesetHasNoBugs() { - RulesetCache.modCheckerAllowUntypedUniques = false for (baseRuleset in BaseRuleset.values()) { val ruleset = RulesetCache[baseRuleset.fullName]!! val modCheck = ruleset.checkModLinks()