Fixed loading / Freebuild unlocks

This commit is contained in:
Anuken
2018-09-28 14:23:56 -04:00
parent 967998273f
commit 4810bbbbd9
2 changed files with 3 additions and 3 deletions

View File

@@ -366,7 +366,7 @@ public class Control extends Module{
} }
//check unlocks every 2 seconds //check unlocks every 2 seconds
if(world.getSector() != null && Timers.get("timerCheckUnlock", 120)){ if(!state.mode.infiniteResources && Timers.get("timerCheckUnlock", 120)){
checkUnlockableBlocks(); checkUnlockableBlocks();
//save if the db changed //save if the db changed

View File

@@ -77,7 +77,7 @@ public class ContentDatabase{
public void load(){ public void load(){
sets.clear(); sets.clear();
ObjectMap<String, ObjectMap<ContentType, Array<String>>> result = Settings.getBinary("content-database", ObjectMap.class, () -> new ObjectMap<>()); ObjectMap<String, ObjectMap<ContentType, Array<String>>> result = Settings.getBinary("content-sets", ObjectMap.class, () -> new ObjectMap<>());
for(Entry<String, ObjectMap<ContentType, Array<String>>> outer : result.entries()){ for(Entry<String, ObjectMap<ContentType, Array<String>>> outer : result.entries()){
ContentUnlockSet cset = new ContentUnlockSet(); ContentUnlockSet cset = new ContentUnlockSet();
@@ -103,7 +103,7 @@ public class ContentDatabase{
output.put(centry.key, write); output.put(centry.key, write);
} }
Settings.putBinary("content-database", output); Settings.putBinary("content-sets", output);
Settings.save(); Settings.save();
} }