Fixed #8777
This commit is contained in:
@@ -16,6 +16,7 @@ import mindustry.game.Teams.*;
|
|||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.maps.Map;
|
import mindustry.maps.Map;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -161,6 +162,11 @@ public abstract class SaveVersion extends SaveFileReader{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//replace the default serpulo env with erekir
|
||||||
|
if(state.rules.planet == Planets.serpulo && state.rules.hasEnv(Env.scorching)){
|
||||||
|
state.rules.planet = Planets.erekir;
|
||||||
|
}
|
||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
Tmp.v1.tryFromString(map.get("viewpos"));
|
Tmp.v1.tryFromString(map.get("viewpos"));
|
||||||
Core.camera.position.set(Tmp.v1);
|
Core.camera.position.set(Tmp.v1);
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ import arc.graphics.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
import mindustry.maps.filters.*;
|
import mindustry.maps.filters.*;
|
||||||
import mindustry.mod.Mods.*;
|
import mindustry.mod.Mods.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -101,6 +103,10 @@ public class Map implements Comparable<Map>, Publishable{
|
|||||||
//this replacement is a MASSIVE hack but it fixes some incorrect overwriting of team-specific rules.
|
//this replacement is a MASSIVE hack but it fixes some incorrect overwriting of team-specific rules.
|
||||||
//may need to be tweaked later
|
//may need to be tweaked later
|
||||||
Rules result = JsonIO.read(Rules.class, base, tags.get("rules", "{}").replace("teams:{2:{infiniteAmmo:true}},", ""));
|
Rules result = JsonIO.read(Rules.class, base, tags.get("rules", "{}").replace("teams:{2:{infiniteAmmo:true}},", ""));
|
||||||
|
//replace the default serpulo env with erekir
|
||||||
|
if(result.planet == Planets.serpulo && result.hasEnv(Env.scorching)){
|
||||||
|
result.planet = Planets.erekir;
|
||||||
|
}
|
||||||
if(result.spawns.isEmpty()) result.spawns = Vars.waves.get();
|
if(result.spawns.isEmpty()) result.spawns = Vars.waves.get();
|
||||||
return result;
|
return result;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
|||||||
@@ -465,6 +465,7 @@ public class ResearchDialog extends BaseDialog{
|
|||||||
|
|
||||||
((TextureRegionDrawable)button.getStyle().imageUp).setRegion(node.selectable ? node.node.content.uiIcon : Icon.lock.getRegion());
|
((TextureRegionDrawable)button.getStyle().imageUp).setRegion(node.selectable ? node.node.content.uiIcon : Icon.lock.getRegion());
|
||||||
button.getImage().setColor(!locked(node.node) ? Color.white : node.selectable ? Color.gray : Pal.gray);
|
button.getImage().setColor(!locked(node.node) ? Color.white : node.selectable ? Color.gray : Pal.gray);
|
||||||
|
button.getImage().layout();
|
||||||
});
|
});
|
||||||
addChild(button);
|
addChild(button);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user