Prepping for multiple rulesets - current ruleset is now is Vanilla folder

This commit is contained in:
Yair Morgenstern 2020-04-24 14:03:41 +03:00
parent 5ec9cc5f67
commit c2fdcb7849
12 changed files with 2 additions and 1 deletions

View file

@ -179,8 +179,9 @@ class Ruleset {
* save all of the loaded rulesets somewhere for later use
* */
object RulesetCache :HashMap<String,Ruleset>() {
val vanillaRuleset = "Civ V - Vanilla"
fun loadRulesets() {
this[""] = Ruleset().apply { load(Gdx.files.internal("jsons")) }
this[""] = Ruleset().apply { load(Gdx.files.internal("jsons/$vanillaRuleset")) }
for (modFolder in Gdx.files.local("mods").list()) {
if (modFolder.name().startsWith('.')) continue