add a display field to weapons just like abilities (#7591)
* weapo * that
This commit is contained in:
@@ -31,6 +31,8 @@ public class Weapon implements Cloneable{
|
||||
public BulletType bullet = Bullets.placeholder;
|
||||
/** shell ejection effect */
|
||||
public Effect ejectEffect = Fx.none;
|
||||
/** whether weapon should appear in the stats of a unit with this weapon */
|
||||
public boolean display = true;
|
||||
/** whether to consume ammo when ammo is enabled in rules */
|
||||
public boolean useAmmo = true;
|
||||
/** whether to create a flipped copy of this weapon upon initialization. default: true */
|
||||
@@ -147,7 +149,7 @@ public class Weapon implements Cloneable{
|
||||
}
|
||||
|
||||
public boolean hasStats(UnitType u){
|
||||
return true;
|
||||
return display;
|
||||
}
|
||||
|
||||
public void addStats(UnitType u, Table t){
|
||||
|
||||
@@ -22,14 +22,10 @@ public class BuildWeapon extends Weapon{
|
||||
rotate = true;
|
||||
noAttack = true;
|
||||
predictTarget = false;
|
||||
display = false;
|
||||
bullet = new BulletType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStats(UnitType u){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Unit unit, WeaponMount mount){
|
||||
mount.shoot = false;
|
||||
|
||||
Reference in New Issue
Block a user