Fixed #3402 / Fixed #3403 / Fixed #3401 / Fixed #3404 / Disabled derelict updates

This commit is contained in:
Anuken
2020-11-15 10:54:09 -05:00
parent 49e4aaa49b
commit aebd3f959f
13 changed files with 50 additions and 27 deletions

View File

@@ -59,10 +59,12 @@ public class ResearchDialog extends BaseDialog{
//add global counts of each sector
for(Planet planet : content.planets()){
for(Sector sector : planet.sectors){
if(sector.hasSave()){
if(sector.hasSave() && sector.hasBase()){
ItemSeq cached = sector.items();
add(cached);
cache.put(sector, cached);
cached.each((item, amount) -> {
values[item.id] += amount;
total += amount;
});
}
}
}

View File

@@ -486,12 +486,17 @@ public class SettingsMenuDialog extends SettingsDialog{
throw new IllegalArgumentException("Not valid save data.");
}
//delete old saves so they don't interfere
saveDirectory.deleteDirectory();
//purge existing tmp data, keep everything else
tmpDirectory.deleteDirectory();
zipped.walk(f -> f.copyTo(base.child(f.path())));
dest.delete();
//clear old data
settings.clear();
//load data so it's saved on exit
settings.load();
}