Hide weapon sprites for certain units
This commit is contained in:
@@ -2948,6 +2948,7 @@ public class UnitTypes{
|
|||||||
weapons.add(new Weapon("merui-weapon"){{
|
weapons.add(new Weapon("merui-weapon"){{
|
||||||
shootSound = Sounds.missile;
|
shootSound = Sounds.missile;
|
||||||
mirror = false;
|
mirror = false;
|
||||||
|
showStatSprite = false;
|
||||||
x = 0f;
|
x = 0f;
|
||||||
y = 1f;
|
y = 1f;
|
||||||
shootY = 4f;
|
shootY = 4f;
|
||||||
@@ -3151,6 +3152,7 @@ public class UnitTypes{
|
|||||||
x = 29f / 4f;
|
x = 29f / 4f;
|
||||||
y = -11f / 4f;
|
y = -11f / 4f;
|
||||||
shootY = 1.5f;
|
shootY = 1.5f;
|
||||||
|
showStatSprite = false;
|
||||||
reload = 130f;
|
reload = 130f;
|
||||||
layerOffset = 0.01f;
|
layerOffset = 0.01f;
|
||||||
heatColor = Color.red;
|
heatColor = Color.red;
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public class Weapon implements Cloneable{
|
|||||||
public boolean alternate = true;
|
public boolean alternate = true;
|
||||||
/** whether to rotate toward the target independently of unit */
|
/** whether to rotate toward the target independently of unit */
|
||||||
public boolean rotate = false;
|
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!*/
|
/** rotation at which this weapon starts at. TODO buggy!*/
|
||||||
public float baseRotation = 0f;
|
public float baseRotation = 0f;
|
||||||
/** whether to draw the outline on top. */
|
/** whether to draw the outline on top. */
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ public class StatValues{
|
|||||||
|
|
||||||
table.table(Styles.grayPanel, w -> {
|
table.table(Styles.grayPanel, w -> {
|
||||||
w.left().top().defaults().padRight(3).left();
|
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();
|
w.row();
|
||||||
|
|
||||||
weapon.addStats(unit, w);
|
weapon.addStats(unit, w);
|
||||||
|
|||||||
Reference in New Issue
Block a user