mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 14:32:06 -08:00
Hide weapon sprites for certain units
This commit is contained in:
parent
affa30730a
commit
fff8f567d0
3 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue