diff --git a/core/src/com/unciv/models/ruleset/Ruleset.kt b/core/src/com/unciv/models/ruleset/Ruleset.kt index 3081639d11..4c9512f70f 100644 --- a/core/src/com/unciv/models/ruleset/Ruleset.kt +++ b/core/src/com/unciv/models/ruleset/Ruleset.kt @@ -404,8 +404,6 @@ class Ruleset { }) } } - - debug("Loading ruleset - %sms", System.currentTimeMillis() - gameBasicsStartTime) } /** Building costs are unique in that they are dependant on info in the technology part. diff --git a/tests/src/com/unciv/logic/civilization/CapitalConnectionsFinderTests.kt b/tests/src/com/unciv/logic/civilization/CapitalConnectionsFinderTests.kt index 87dd6a8cfd..bac3d89298 100644 --- a/tests/src/com/unciv/logic/civilization/CapitalConnectionsFinderTests.kt +++ b/tests/src/com/unciv/logic/civilization/CapitalConnectionsFinderTests.kt @@ -49,7 +49,7 @@ class CapitalConnectionsFinderTests { @Before fun setup() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) rules = RulesetCache.getVanillaRuleset() // Setup the GameInfo mock every { mockGameInfo.getCivilization(capture(slot)) } answers { civilizations.getValue(slot.captured) } diff --git a/tests/src/com/unciv/logic/map/FreshWaterTests.kt b/tests/src/com/unciv/logic/map/FreshWaterTests.kt index 9bad098981..348f4fdc4c 100644 --- a/tests/src/com/unciv/logic/map/FreshWaterTests.kt +++ b/tests/src/com/unciv/logic/map/FreshWaterTests.kt @@ -24,7 +24,7 @@ class FreshWaterTests { @Before fun initTheWorld() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleSet = RulesetCache.getVanillaRuleset() map = MapSaver.mapFromSavedString(testingMap) map.setTransients(ruleSet, false) diff --git a/tests/src/com/unciv/logic/map/TileImprovementConstructionTests.kt b/tests/src/com/unciv/logic/map/TileImprovementConstructionTests.kt index fb47f965ad..b41c641b36 100644 --- a/tests/src/com/unciv/logic/map/TileImprovementConstructionTests.kt +++ b/tests/src/com/unciv/logic/map/TileImprovementConstructionTests.kt @@ -33,7 +33,7 @@ class TileImprovementConstructionTests { @Before fun initTheWorld() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleSet = RulesetCache.getVanillaRuleset() civInfo.tech.researchedTechnologies.addAll(ruleSet.technologies.values) civInfo.tech.techsResearched.addAll(ruleSet.technologies.keys) diff --git a/tests/src/com/unciv/logic/map/TileMapTests.kt b/tests/src/com/unciv/logic/map/TileMapTests.kt index 40ba981fa2..e8336ea1a2 100644 --- a/tests/src/com/unciv/logic/map/TileMapTests.kt +++ b/tests/src/com/unciv/logic/map/TileMapTests.kt @@ -21,7 +21,7 @@ class TileMapTests { @Before fun initTheWorld() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleSet = RulesetCache.getVanillaRuleset() map = TileMap() diff --git a/tests/src/com/unciv/logic/map/UnitMovementAlgorithmsTests.kt b/tests/src/com/unciv/logic/map/UnitMovementAlgorithmsTests.kt index e430920747..2f9892da33 100644 --- a/tests/src/com/unciv/logic/map/UnitMovementAlgorithmsTests.kt +++ b/tests/src/com/unciv/logic/map/UnitMovementAlgorithmsTests.kt @@ -25,7 +25,7 @@ class UnitMovementAlgorithmsTests { @Before fun initTheWorld() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleSet = RulesetCache.getVanillaRuleset() tile.ruleset = ruleSet tile.baseTerrain = Constants.grassland diff --git a/tests/src/com/unciv/logic/map/VisibilityTests.kt b/tests/src/com/unciv/logic/map/VisibilityTests.kt index 611ad282ea..0cc7b092be 100644 --- a/tests/src/com/unciv/logic/map/VisibilityTests.kt +++ b/tests/src/com/unciv/logic/map/VisibilityTests.kt @@ -22,7 +22,7 @@ class VisibilityTests { @Before fun initTheWorld() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleSet = RulesetCache.getVanillaRuleset() civInfo.gameInfo = GameInfo() civInfo.gameInfo.ruleSet = ruleSet diff --git a/tests/src/com/unciv/testing/BasicTests.kt b/tests/src/com/unciv/testing/BasicTests.kt index 2fcf1cf026..db2ca23940 100644 --- a/tests/src/com/unciv/testing/BasicTests.kt +++ b/tests/src/com/unciv/testing/BasicTests.kt @@ -17,6 +17,7 @@ import com.unciv.models.stats.Stat import com.unciv.models.stats.Stats import com.unciv.models.translations.getPlaceholderParameters import com.unciv.models.translations.getPlaceholderText +import com.unciv.utils.Log import com.unciv.utils.debug import org.junit.Assert import org.junit.Before @@ -31,7 +32,8 @@ class BasicTests { var ruleset = Ruleset() @Before fun loadTranslations() { - RulesetCache.loadRulesets() + Log.shouldLog() + RulesetCache.loadRulesets(noMods = true) ruleset = RulesetCache.getVanillaRuleset() } diff --git a/tests/src/com/unciv/testing/TranslationTests.kt b/tests/src/com/unciv/testing/TranslationTests.kt index 37e38f6276..933aafba0c 100644 --- a/tests/src/com/unciv/testing/TranslationTests.kt +++ b/tests/src/com/unciv/testing/TranslationTests.kt @@ -29,7 +29,7 @@ class TranslationTests { override fun write(b: Int) {} })) translations.readAllLanguagesTranslation() - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleset = RulesetCache.getVanillaRuleset() System.setOut(outputChannel) } diff --git a/tests/src/com/unciv/uniques/TestGame.kt b/tests/src/com/unciv/uniques/TestGame.kt index d2a922286f..c85db60d13 100644 --- a/tests/src/com/unciv/uniques/TestGame.kt +++ b/tests/src/com/unciv/uniques/TestGame.kt @@ -45,7 +45,7 @@ class TestGame { UncivGame.Current.settings = GameSettings() // Create a new ruleset we can easily edit, and set the important variables of gameInfo - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) ruleset = RulesetCache[BaseRuleset.Civ_V_GnK.fullName]!! gameInfo.ruleSet = ruleset gameInfo.difficultyObject = ruleset.difficulties["Prince"]!! diff --git a/tests/src/com/unciv/uniques/TriggeredUniquesTests.kt b/tests/src/com/unciv/uniques/TriggeredUniquesTests.kt index 7e7ae72d1f..5db0fa1512 100644 --- a/tests/src/com/unciv/uniques/TriggeredUniquesTests.kt +++ b/tests/src/com/unciv/uniques/TriggeredUniquesTests.kt @@ -3,7 +3,6 @@ package com.unciv.uniques import com.badlogic.gdx.math.Vector2 import com.unciv.logic.battle.BattleDamage import com.unciv.logic.battle.MapUnitCombatant -import com.unciv.models.ruleset.unique.StateForConditionals import com.unciv.models.ruleset.unique.UniqueType import com.unciv.testing.GdxTestRunner import org.junit.Assert @@ -25,7 +24,7 @@ class TriggeredUniquesTests { @Test fun testConditionalTimedUniqueIsTriggerable() { - val unique = policy.getMatchingUniques(UniqueType.Strength, StateForConditionals.IgnoreConditionals).firstOrNull() + val unique = policy.uniqueObjects.first{ it.type == UniqueType.Strength } Assert.assertTrue("Unique with timed conditional must be triggerable", unique!!.isTriggerable) } diff --git a/tests/src/com/unciv/uniques/UniqueErrorTests.kt b/tests/src/com/unciv/uniques/UniqueErrorTests.kt index 32286922f9..ad5aab18fa 100644 --- a/tests/src/com/unciv/uniques/UniqueErrorTests.kt +++ b/tests/src/com/unciv/uniques/UniqueErrorTests.kt @@ -25,7 +25,7 @@ class UniqueErrorTests { @Test fun testCodependantTechs() { - RulesetCache.loadRulesets() + RulesetCache.loadRulesets(noMods = true) val ruleset = RulesetCache.getVanillaRuleset() // Create a prerequisite loop