diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index e7fd74d3d7..a9178752d5 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -270,10 +270,10 @@ public class ErekirTechTree{ }); - node(tankReconstructor, () -> { + node(tankReconstructor, Seq.with(new OnSector(three)), () -> { node(UnitTypes.locus); - node(shipReconstructor, () -> { + node(shipReconstructor, Seq.with(new OnSector(four)), () -> { node(UnitTypes.avert); node(mechReconstructor, () -> { diff --git a/core/src/mindustry/content/Planets.java b/core/src/mindustry/content/Planets.java index a3d2f05914..2dd4e4d5a2 100644 --- a/core/src/mindustry/content/Planets.java +++ b/core/src/mindustry/content/Planets.java @@ -146,6 +146,7 @@ public class Planets{ minZoom = 0.6f; drawOrbit = false; clipRadius = 2f; + defaultEnv = Env.space; generator = new AsteroidGenerator(); cgen.get((AsteroidGenerator)generator); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index d08b065c1c..57b638d913 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1245,7 +1245,7 @@ public class UnitTypes{ //region air support mono = new UnitType("mono"){{ - defaultController = u -> new MinerAI(); + controller = u -> new MinerAI(); flying = true; drag = 0.06f; @@ -1264,7 +1264,7 @@ public class UnitTypes{ }}; poly = new UnitType("poly"){{ - defaultController = u -> new BuilderAI(); + controller = u -> new BuilderAI(); flying = true; drag = 0.05f; @@ -3418,7 +3418,7 @@ public class UnitTypes{ //TODO bad name evoke = new ErekirUnitType("evoke"){{ coreUnitDock = true; - defaultController = u -> new BuilderAI(true, coreFleeRange); + controller = u -> new BuilderAI(true, coreFleeRange); isCounted = false; envDisabled = 0; @@ -3478,7 +3478,7 @@ public class UnitTypes{ incite = new ErekirUnitType("incite"){{ coreUnitDock = true; - defaultController = u -> new BuilderAI(true, coreFleeRange); + controller = u -> new BuilderAI(true, coreFleeRange); isCounted = false; envDisabled = 0; @@ -3551,7 +3551,7 @@ public class UnitTypes{ emanate = new ErekirUnitType("emanate"){{ coreUnitDock = true; - defaultController = u -> new BuilderAI(true, coreFleeRange); + controller = u -> new BuilderAI(true, coreFleeRange); isCounted = false; envDisabled = 0; diff --git a/core/src/mindustry/maps/planet/AsteroidGenerator.java b/core/src/mindustry/maps/planet/AsteroidGenerator.java index 301d5c2e9c..6f11a5436f 100644 --- a/core/src/mindustry/maps/planet/AsteroidGenerator.java +++ b/core/src/mindustry/maps/planet/AsteroidGenerator.java @@ -10,7 +10,6 @@ import mindustry.graphics.g3d.*; import mindustry.maps.generators.*; import mindustry.type.*; import mindustry.world.blocks.environment.*; -import mindustry.world.meta.*; import static mindustry.Vars.*; @@ -142,7 +141,6 @@ public class AsteroidGenerator extends BlankPlanetGenerator{ state.rules.dragMultiplier = 0.7f; //yes, space actually has 0 drag but true 0% drag is very annoying state.rules.borderDarkness = false; - state.rules.env = Env.space; state.rules.waves = true; //TODO ??? diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 1c893e5c41..052f9dc0a2 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -471,7 +471,7 @@ public class ContentParser{ } if(value.has("defaultController")){ - unit.defaultController = u -> supply(resolve(value.getString("defaultController"), FlyingAI.class)).get(); + unit.controller = u -> supply(resolve(value.getString("defaultController"), FlyingAI.class)).get(); value.remove("defaultController"); } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 2616265e22..248ea8d4c8 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -114,7 +114,7 @@ public class UnitType extends UnlockableContent{ /** The default AI controller to assign on creation. */ public Prov aiController = () -> !flying ? new GroundAI() : new FlyingAI(); /** Function that chooses AI controller based on unit entity. */ - public Func defaultController = u -> !playerControllable || (u.team.isAI() && !u.team.rules().rtsAi) ? aiController.get() : new CommandAI(); + public Func controller = u -> !playerControllable || (u.team.isAI() && !u.team.rules().rtsAi) ? aiController.get() : new CommandAI(); public Color outlineColor = Pal.darkerMetal; public int outlineRadius = 3; @@ -219,7 +219,7 @@ public class UnitType extends UnlockableContent{ } public UnitController createController(Unit unit){ - return defaultController.get(unit); + return controller.get(unit); } public Unit create(Team team){