mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-19 16:57:15 +07:00
Note
This commit is contained in:
parent
59e5099ed6
commit
e24d96da6f
@ -13,6 +13,7 @@ import java.util.zip.InflaterInputStream;
|
|||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
|
//TODO load backup meta if possible
|
||||||
public class SaveIO{
|
public class SaveIO{
|
||||||
public static final IntArray breakingVersions = IntArray.with(47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 63);
|
public static final IntArray breakingVersions = IntArray.with(47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 63);
|
||||||
public static final IntMap<SaveFileVersion> versions = new IntMap<>();
|
public static final IntMap<SaveFileVersion> versions = new IntMap<>();
|
||||||
@ -65,9 +66,7 @@ public class SaveIO{
|
|||||||
public static boolean isSaveValid(DataInputStream stream){
|
public static boolean isSaveValid(DataInputStream stream){
|
||||||
|
|
||||||
try{
|
try{
|
||||||
int version = stream.readInt();
|
getData(stream);
|
||||||
SaveFileVersion ver = versions.get(version);
|
|
||||||
ver.getData(stream);
|
|
||||||
return true;
|
return true;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user