Usage of ExtendedPreferences
This commit is contained in:
@@ -86,7 +86,7 @@ public class Maps implements Disposable{
|
||||
Settings.putString("map-data-" + name, new String(Base64Coder.encode(stream.toByteArray())));
|
||||
if(!customMapNames.contains(name, false)){
|
||||
customMapNames.add(name);
|
||||
Settings.putBinary("custom-maps", customMapNames);
|
||||
Settings.putObject("custom-maps", customMapNames);
|
||||
}
|
||||
Settings.save();
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class Maps implements Disposable{
|
||||
} else {
|
||||
customMapNames.removeValue(map.name, false);
|
||||
Settings.putString("map-data-" + map.name, "");
|
||||
Settings.putBinary("custom-maps", customMapNames);
|
||||
Settings.putObject("custom-maps", customMapNames);
|
||||
Settings.save();
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class Maps implements Disposable{
|
||||
}
|
||||
|
||||
}else{
|
||||
customMapNames = Settings.getBinary("custom-maps", Array.class, () -> new Array<>());
|
||||
customMapNames = Settings.getObject("custom-maps", Array.class, () -> new Array<>());
|
||||
|
||||
for(String name : customMapNames){
|
||||
try{
|
||||
|
||||
@@ -262,7 +262,7 @@ public class Sectors{
|
||||
}
|
||||
grid.clear();
|
||||
|
||||
Array<Sector> out = Settings.getBinary("sectors", Array.class, () -> new Array<>());
|
||||
Array<Sector> out = Settings.getObject("sectors", Array.class, () -> new Array<>());
|
||||
|
||||
for(Sector sector : out){
|
||||
createTexture(sector);
|
||||
@@ -286,7 +286,7 @@ public class Sectors{
|
||||
out.add(sector);
|
||||
}
|
||||
|
||||
Settings.putBinary("sectors", out);
|
||||
Settings.putObject("sectors", out);
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user