Hide weapon sprites for certain units

This commit is contained in:
Anuken 2023-04-01 17:30:05 -04:00
parent affa30730a
commit fff8f567d0
3 changed files with 5 additions and 1 deletions

View file

@ -2948,6 +2948,7 @@ public class UnitTypes{
weapons.add(new Weapon("merui-weapon"){{
shootSound = Sounds.missile;
mirror = false;
showStatSprite = false;
x = 0f;
y = 1f;
shootY = 4f;
@ -3151,6 +3152,7 @@ public class UnitTypes{
x = 29f / 4f;
y = -11f / 4f;
shootY = 1.5f;
showStatSprite = false;
reload = 130f;
layerOffset = 0.01f;
heatColor = Color.red;

View file

@ -43,6 +43,8 @@ public class Weapon implements Cloneable{
public boolean alternate = true;
/** whether to rotate toward the target independently of unit */
public boolean rotate = false;
/** Whether to show the sprite of the weapon in the database. */
public boolean showStatSprite = true;
/** rotation at which this weapon starts at. TODO buggy!*/
public float baseRotation = 0f;
/** whether to draw the outline on top. */

View file

@ -296,7 +296,7 @@ public class StatValues{
table.table(Styles.grayPanel, w -> {
w.left().top().defaults().padRight(3).left();
if(region != null && region.found()) w.image(region).size(60).scaling(Scaling.bounded).left().top();
if(region != null && region.found() && weapon.showStatSprite) w.image(region).size(60).scaling(Scaling.bounded).left().top();
w.row();
weapon.addStats(unit, w);