mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-01 20:04:02 +07:00
Made replaced preset sector saves auto-delete
This commit is contained in:
parent
cc0cdeb6c0
commit
7e0f68b24d
@ -55,6 +55,16 @@ public class Saves{
|
||||
}
|
||||
}
|
||||
|
||||
//clear saves from build <130 that had the new naval sectors.
|
||||
saves.removeAll(s -> {
|
||||
if(s.getSector() != null && (s.getSector().id == 108 || s.getSector().id == 216) && s.meta.build <= 130 && s.meta.build > 0){
|
||||
s.getSector().clearInfo();
|
||||
s.file.delete();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
lastSectorSave = saves.find(s -> s.isSector() && s.getName().equals(Core.settings.getString("last-sector-save", "<none>")));
|
||||
|
||||
//automatically assign sector save slots
|
||||
@ -289,7 +299,7 @@ public class Saves{
|
||||
return meta.mods;
|
||||
}
|
||||
|
||||
public Sector getSector(){
|
||||
public @Nullable Sector getSector(){
|
||||
return meta == null || meta.rules == null ? null : meta.rules.sector;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user