From 4810bbbbd9689ef230366c0bcc108dc27735d840 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 28 Sep 2018 14:23:56 -0400 Subject: [PATCH] Fixed loading / Freebuild unlocks --- core/src/io/anuke/mindustry/core/Control.java | 2 +- core/src/io/anuke/mindustry/game/ContentDatabase.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 9d8aa08e6a..e1c8d6b479 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -366,7 +366,7 @@ public class Control extends Module{ } //check unlocks every 2 seconds - if(world.getSector() != null && Timers.get("timerCheckUnlock", 120)){ + if(!state.mode.infiniteResources && Timers.get("timerCheckUnlock", 120)){ checkUnlockableBlocks(); //save if the db changed diff --git a/core/src/io/anuke/mindustry/game/ContentDatabase.java b/core/src/io/anuke/mindustry/game/ContentDatabase.java index 4a9934a237..e1740a5a7f 100644 --- a/core/src/io/anuke/mindustry/game/ContentDatabase.java +++ b/core/src/io/anuke/mindustry/game/ContentDatabase.java @@ -77,7 +77,7 @@ public class ContentDatabase{ public void load(){ sets.clear(); - ObjectMap>> result = Settings.getBinary("content-database", ObjectMap.class, () -> new ObjectMap<>()); + ObjectMap>> result = Settings.getBinary("content-sets", ObjectMap.class, () -> new ObjectMap<>()); for(Entry>> outer : result.entries()){ ContentUnlockSet cset = new ContentUnlockSet(); @@ -103,7 +103,7 @@ public class ContentDatabase{ output.put(centry.key, write); } - Settings.putBinary("content-database", output); + Settings.putBinary("content-sets", output); Settings.save(); }