mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-19 20:28:56 +07:00
chore: renamed GameInfo.ruleSet -> ruleset
This commit is contained in:
@ -56,7 +56,7 @@ class CapitalConnectionsFinderTests {
|
||||
every { mockGameInfo.getCivilization(capture(slot)) } answers { civilizations.getValue(slot.captured) }
|
||||
every { mockGameInfo.civilizations } answers { civilizations.values.toMutableList() }
|
||||
every { mockGameInfo.tileMap } returns tilesMap
|
||||
every { mockGameInfo.ruleSet } returns rules
|
||||
every { mockGameInfo.ruleset } returns rules
|
||||
every { mockGameInfo.getCities() } answers { civilizations.values.asSequence().flatMap { it.cities } }
|
||||
// Needs for founding cities
|
||||
every { mockGameInfo.turns } returns 1
|
||||
|
@ -37,7 +37,7 @@ class UnitMovementAlgorithmsTests {
|
||||
civInfo.tech.embarkedUnitsCanEnterOcean = true
|
||||
civInfo.tech.unitsCanEmbark = true
|
||||
civInfo.gameInfo = GameInfo()
|
||||
civInfo.gameInfo.ruleSet = ruleSet
|
||||
civInfo.gameInfo.ruleset = ruleSet
|
||||
civInfo.gameInfo.difficultyObject = Difficulty()
|
||||
civInfo.gameInfo.speed = ruleSet.speeds[Speed.DEFAULTFORSIMULATION]!!
|
||||
civInfo.nation = Nation().apply { name = "My nation" }
|
||||
|
@ -28,7 +28,7 @@ class VisibilityTests {
|
||||
RulesetCache.loadRulesets(noMods = true)
|
||||
ruleSet = RulesetCache.getVanillaRuleset()
|
||||
civInfo.gameInfo = GameInfo()
|
||||
civInfo.gameInfo.ruleSet = ruleSet
|
||||
civInfo.gameInfo.ruleset = ruleSet
|
||||
civInfo.nation = Nation().apply { name = "My nation" }
|
||||
civInfo.gameInfo.civilizations.add(civInfo)
|
||||
civInfo.gameInfo.civilizations.add(enemyCivInfo)
|
||||
|
@ -48,7 +48,7 @@ class TestGame {
|
||||
// Create a new ruleset we can easily edit, and set the important variables of gameInfo
|
||||
RulesetCache.loadRulesets(noMods = true)
|
||||
ruleset = RulesetCache[BaseRuleset.Civ_V_GnK.fullName]!!
|
||||
gameInfo.ruleSet = ruleset
|
||||
gameInfo.ruleset = ruleset
|
||||
gameInfo.difficultyObject = ruleset.difficulties["Prince"]!!
|
||||
gameInfo.speed = ruleset.speeds[Speed.DEFAULTFORSIMULATION]!!
|
||||
gameInfo.currentPlayerCiv = Civilization()
|
||||
@ -188,7 +188,7 @@ class TestGame {
|
||||
fun createBaseUnit(unitType: String = createUnitType().name, vararg uniques: String) =
|
||||
createRulesetObject(ruleset.units, *uniques) {
|
||||
val baseUnit = BaseUnit()
|
||||
baseUnit.ruleset = gameInfo.ruleSet
|
||||
baseUnit.ruleset = gameInfo.ruleset
|
||||
baseUnit.unitType = unitType
|
||||
baseUnit
|
||||
}
|
||||
|
Reference in New Issue
Block a user