Fixed loading / Freebuild unlocks
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user