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:
proteus-anguinus
2020-03-25 11:52:20 +01:00
committed by GitHub
parent 06af3917ce
commit c40dd09e11
2 changed files with 5 additions and 8 deletions

View File

@ -171,12 +171,12 @@ object RulesetCache :HashMap<String,Ruleset>(){
fun getComplexRuleset(mods:Collection<String>): Ruleset {
val newRuleset = Ruleset()
newRuleset.add(getBaseRuleset())
for(mod in mods)
if(containsKey(mod)) {
newRuleset.add(this[mod]!!)
newRuleset.mods+=mod
}
newRuleset.add(getBaseRuleset())
return newRuleset
}
}