mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-09-22 13:01:12 +03:00
yet another requiredPlanets fix (#12649)
This commit is contained in:
@@ -6,6 +6,7 @@ import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import arc.util.serialization.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.content.TechTree.*;
|
||||
import mindustry.core.*;
|
||||
@@ -554,6 +555,14 @@ public abstract class SaveVersion extends SaveFileReader{
|
||||
public void readDataPatches(DataInput stream, SaveReadState saveState) throws IOException{
|
||||
stream.readInt(); //version - ignored for now
|
||||
|
||||
//the requiredPlanets filter needs this, since the rules aren't read yet
|
||||
if(headless){
|
||||
try{
|
||||
Planet planet = content.planet(new JsonReader().parse(saveState.ruleString).getString("planet", Planets.serpulo.name));
|
||||
state.rules.planet = planet == null ? Planets.serpulo : planet;
|
||||
}catch(Exception ignored){}
|
||||
}
|
||||
|
||||
int total = stream.readInt();
|
||||
Seq<DataAsset> assets = new Seq<>(total);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user