Added backwards compatibility for legacy saves

This commit is contained in:
Anuken
2020-02-17 11:13:46 -05:00
parent 18d4efa315
commit e215772f30
34 changed files with 1009 additions and 855 deletions

View File

@@ -1,30 +0,0 @@
package mindustry.io.versions;
import java.io.*;
public class Save1 extends Save2{
public Save1(){
version = 1;
}
@Override
public void readEntities(DataInput stream) throws IOException{
//TODO implement
//Prov[] table = LegacyTypeTable.getTable(lastReadBuild);
byte groups = stream.readByte();
for(int i = 0; i < groups; i++){
int amount = stream.readInt();
for(int j = 0; j < amount; j++){
readChunk(stream, true, in -> {
byte typeid = in.readByte();
byte version = in.readByte();
//SaveTrait trait = (SaveTrait)table[typeid].get();
//trait.readSave(in, version);
});
}
}
}
}