This commit is contained in:
Anuken
2020-09-09 23:39:00 -04:00
parent 2260e6824c
commit 3b5d6860d6
56 changed files with 554 additions and 544 deletions
+8 -6
View File
@@ -8,11 +8,7 @@ import mindustry.world.*;
import java.io.*;
public abstract class SaveFileReader{
protected final ReusableByteOutStream byteOutput = new ReusableByteOutStream();
protected final DataOutputStream dataBytes = new DataOutputStream(byteOutput);
protected final ReusableByteOutStream byteOutputSmall = new ReusableByteOutStream();
protected final DataOutputStream dataBytesSmall = new DataOutputStream(byteOutputSmall);
protected final ObjectMap<String, String> fallback = ObjectMap.of(
public static final ObjectMap<String, String> fallback = ObjectMap.of(
"dart-mech-pad", "legacy-mech-pad",
"dart-ship-pad", "legacy-mech-pad",
"javelin-ship-pad", "legacy-mech-pad",
@@ -35,9 +31,15 @@ public abstract class SaveFileReader{
"fortress-factory", "legacy-unit-factory",
"mass-conveyor", "payload-conveyor",
"vestige", "scepter"
"vestige", "scepter",
"turbine-generator", "steam-generator"
);
protected final ReusableByteOutStream byteOutput = new ReusableByteOutStream();
protected final DataOutputStream dataBytes = new DataOutputStream(byteOutput);
protected final ReusableByteOutStream byteOutputSmall = new ReusableByteOutStream();
protected final DataOutputStream dataBytesSmall = new DataOutputStream(byteOutputSmall);
protected int lastRegionLength;
protected void region(String name, DataInput stream, CounterInputStream counter, IORunner<DataInput> cons) throws IOException{