mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Fixed loading / Freebuild unlocks
This commit is contained in:
parent
967998273f
commit
4810bbbbd9
@ -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
|
||||
|
@ -77,7 +77,7 @@ public class ContentDatabase{
|
||||
public void load(){
|
||||
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()){
|
||||
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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user