From 31f4957657ba2922d9d54b085ece59d5e96ce4f5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 22 Apr 2024 17:31:13 -0400 Subject: [PATCH] Removed UnitComp#uiIcon() --- core/src/mindustry/entities/comp/BlockUnitComp.java | 6 ------ core/src/mindustry/entities/comp/PlayerComp.java | 2 +- core/src/mindustry/entities/comp/UnitComp.java | 7 +------ core/src/mindustry/graphics/MinimapRenderer.java | 2 +- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/core/src/mindustry/entities/comp/BlockUnitComp.java b/core/src/mindustry/entities/comp/BlockUnitComp.java index bd13c88991..5ab3327f76 100644 --- a/core/src/mindustry/entities/comp/BlockUnitComp.java +++ b/core/src/mindustry/entities/comp/BlockUnitComp.java @@ -40,12 +40,6 @@ abstract class BlockUnitComp implements Unitc{ @Replace @Override public TextureRegion icon(){ - return tile.block.fullIcon; - } - - @Replace - @Override - public TextureRegion uiIcon(){ return tile.block.uiIcon; } diff --git a/core/src/mindustry/entities/comp/PlayerComp.java b/core/src/mindustry/entities/comp/PlayerComp.java index 45a80b7c1f..50ce197306 100644 --- a/core/src/mindustry/entities/comp/PlayerComp.java +++ b/core/src/mindustry/entities/comp/PlayerComp.java @@ -74,7 +74,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra //display default icon for dead players if(dead()) return core() == null ? UnitTypes.alpha.uiIcon : ((CoreBlock)bestCore().block).unitType.uiIcon; - return unit.uiIcon(); + return unit.icon(); } public boolean displayAmmo(){ diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index eb9b64f032..1b4e095909 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -666,13 +666,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I } } - /** @return a preview icon for this unit. */ - public TextureRegion icon(){ - return type.fullIcon; - } - /** @return a preview UI icon for this unit. */ - public TextureRegion uiIcon(){ + public TextureRegion icon(){ return type.uiIcon; } diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java index a14935a379..e5f42b2c9a 100644 --- a/core/src/mindustry/graphics/MinimapRenderer.java +++ b/core/src/mindustry/graphics/MinimapRenderer.java @@ -166,7 +166,7 @@ public class MinimapRenderer{ if(unit.inFogTo(player.team()) || !unit.type.drawMinimap) continue; float scale = Scl.scl(1f) * tilesize * 3; - var region = unit.uiIcon(); + var region = unit.icon(); Draw.mixcol(unit.team.color, 1f); Draw.rect(region, unit.x, unit.y, scale, scale * (float)region.height / region.width, unit.rotation() - 90);