Complex ruleset merge order (#2240)
* .gitignore: mods SaveFiles transients * Simple transposition prevents mod improvements from appearing below roads&removals should also move modded nations to the top in new game player picker
This commit is contained in:
parent
06af3917ce
commit
c40dd09e11
2 changed files with 5 additions and 8 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -101,13 +101,6 @@ nb-configuration.xml
|
||||||
/local.properties
|
/local.properties
|
||||||
.gradle/
|
.gradle/
|
||||||
gradle-app.setting
|
gradle-app.setting
|
||||||
/build/
|
|
||||||
/android/build/
|
|
||||||
/core/build/
|
|
||||||
/desktop/build/
|
|
||||||
/html/build/
|
|
||||||
/ios/build/
|
|
||||||
/ios-moe/build/
|
|
||||||
|
|
||||||
## OS Specific
|
## OS Specific
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -139,3 +132,7 @@ desktop/packr/
|
||||||
desktop/packrCache/
|
desktop/packrCache/
|
||||||
deploy/
|
deploy/
|
||||||
android/release/
|
android/release/
|
||||||
|
|
||||||
|
android/assets/mods/
|
||||||
|
android/assets/SaveFiles/
|
||||||
|
android/assets/GameSettingsOld.json
|
||||||
|
|
|
@ -171,12 +171,12 @@ object RulesetCache :HashMap<String,Ruleset>(){
|
||||||
|
|
||||||
fun getComplexRuleset(mods:Collection<String>): Ruleset {
|
fun getComplexRuleset(mods:Collection<String>): Ruleset {
|
||||||
val newRuleset = Ruleset()
|
val newRuleset = Ruleset()
|
||||||
newRuleset.add(getBaseRuleset())
|
|
||||||
for(mod in mods)
|
for(mod in mods)
|
||||||
if(containsKey(mod)) {
|
if(containsKey(mod)) {
|
||||||
newRuleset.add(this[mod]!!)
|
newRuleset.add(this[mod]!!)
|
||||||
newRuleset.mods+=mod
|
newRuleset.mods+=mod
|
||||||
}
|
}
|
||||||
|
newRuleset.add(getBaseRuleset())
|
||||||
return newRuleset
|
return newRuleset
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue