Removed UnitComp#uiIcon()

This commit is contained in:
Anuken 2024-04-22 17:31:13 -04:00
parent 49489ffadc
commit 31f4957657
4 changed files with 3 additions and 14 deletions

View File

@ -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;
}

View File

@ -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(){

View File

@ -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;
}

View File

@ -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);