From 9dd17ca16b885b8d032792713f1c1746932a02ec Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 23 Apr 2024 09:32:39 -0400 Subject: [PATCH] Moved drawBuilding to UnitType --- core/src/mindustry/entities/comp/BuilderComp.java | 4 ---- core/src/mindustry/type/UnitType.java | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index 0c5070febb..df3692ee0e 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -290,10 +290,6 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ return plans.size == 0 ? null : plans.first(); } - public void draw(){ - drawBuilding(); - } - public void drawBuilding(){ //TODO make this more generic so it works with builder "weapons" boolean active = activelyBuilding(); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 7ad45fad64..6734f1bc07 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1193,6 +1193,8 @@ public class UnitType extends UnlockableContent implements Senseable{ public void draw(Unit unit){ if(unit.inFogTo(Vars.player.team())) return; + unit.drawBuilding(); + boolean isPayload = !unit.isAdded(); Mechc mech = unit instanceof Mechc ? (Mechc)unit : null;