diff --git a/core/src/mindustry/ai/types/GroundAI.java b/core/src/mindustry/ai/types/GroundAI.java index f3bb0c6a21..3d29310640 100644 --- a/core/src/mindustry/ai/types/GroundAI.java +++ b/core/src/mindustry/ai/types/GroundAI.java @@ -19,8 +19,8 @@ public class GroundAI extends AIController{ target = null; //TODO this is hacky, cleanup - if(unit instanceof Legsc && unit.moving()){ - unit.lookAt(((Legsc)unit).baseRotation()); + if(unit instanceof Mechc && unit.moving()){ + unit.lookAt(((Mechc)unit).baseRotation()); } } diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index ac789fde21..7748f7acc4 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -12,10 +12,10 @@ import mindustry.type.*; public class UnitTypes implements ContentList{ //ground - public static @EntityDef({Unitc.class, Legsc.class}) UnitType titan, dagger, crawler, fortress, eruptor, chaosArray, eradicator; + public static @EntityDef({Unitc.class, Mechc.class}) UnitType titan, dagger, crawler, fortress, eruptor, chaosArray, eradicator; //ground + builder - public static @EntityDef({Unitc.class, Legsc.class, Builderc.class}) UnitType oculon, tau; + public static @EntityDef({Unitc.class, Mechc.class, Builderc.class}) UnitType oculon, tau; //air public static @EntityDef({Unitc.class}) UnitType wraith, reaper, ghoul, revenant, lich; diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index ec9ff4da09..7aa36a7981 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -569,7 +569,7 @@ public class NetClient implements ApplicationListener{ unit.x(), unit.y(), player.unit().aimX(), player.unit().aimY(), unit.rotation(), - unit instanceof Legsc ? ((Legsc)unit).baseRotation() : 0, + unit instanceof Mechc ? ((Mechc)unit).baseRotation() : 0, unit.vel().x, unit.vel().y, player.miner().mineTile(), control.input.isBoosting, control.input.isShooting, ui.chatfrag.shown(), diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 6ea2056176..0329a94935 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -640,7 +640,7 @@ public class NetServer implements ApplicationListener{ fbuffer.position(0); //now, put the new position, rotation and baserotation into the buffer so it can be read - if(unit instanceof Legsc) fbuffer.put(baseRotation); //base rotation is optional + if(unit instanceof Mechc) fbuffer.put(baseRotation); //base rotation is optional fbuffer.put(rotation); //rotation is always there fbuffer.put(newx); fbuffer.put(newy); diff --git a/core/src/mindustry/entities/comp/LegsComp.java b/core/src/mindustry/entities/comp/MechComp.java similarity index 84% rename from core/src/mindustry/entities/comp/LegsComp.java rename to core/src/mindustry/entities/comp/MechComp.java index 37cf33a244..7cf6db2373 100644 --- a/core/src/mindustry/entities/comp/LegsComp.java +++ b/core/src/mindustry/entities/comp/MechComp.java @@ -6,7 +6,7 @@ import mindustry.annotations.Annotations.*; import mindustry.gen.*; @Component -abstract class LegsComp implements Posc, Flyingc, Hitboxc, Unitc, Legsc, ElevationMovec{ +abstract class MechComp implements Posc, Flyingc, Hitboxc, Unitc, Mechc, ElevationMovec{ @SyncField(false) @SyncLocal float baseRotation; transient float walkTime; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index e195962238..4b795ee748 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -125,7 +125,7 @@ public class UnitType extends UnlockableContent{ //region drawing public void draw(Unitc unit){ - Legsc legs = unit instanceof Legsc ? (Legsc)unit : null; + Mechc legs = unit instanceof Mechc ? (Mechc)unit : null; float z = unit.elevation() > 0.5f ? (lowAltitude ? Layer.flyingUnitLow : Layer.flyingUnit) : Layer.groundUnit; if(unit.controller().isBeingControlled(player.unit())){ @@ -309,7 +309,7 @@ public class UnitType extends UnlockableContent{ } } - public void drawLegs(Legsc unit){ + public void drawLegs(Mechc unit){ Draw.reset(); Draw.mixcol(Color.white, unit.hitTime()); diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index 5011b63e15..0ca371c8a5 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -246,7 +246,7 @@ public class Generators{ Image image = ImagePacker.get(type.region); - if(type.constructor.get() instanceof Legsc){ + if(type.constructor.get() instanceof Mechc){ image.drawCenter(type.baseRegion); image.drawCenter(type.legRegion); image.drawCenter(type.legRegion, true, false);