diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 3c2cc4a1be..95c6e8912d 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -229,6 +229,8 @@ public class UnitType extends UnlockableContent{ if(inst instanceof Payloadc){ stats.add(Stat.payloadCapacity, (payloadCapacity / (tilesize * tilesize)), StatUnit.blocksSquared); } + + stats.add(Stat.weapons, new WeaponListValue(this, weapons)); } @CallSuper diff --git a/core/src/mindustry/world/meta/Stat.java b/core/src/mindustry/world/meta/Stat.java index 718dbb8f2d..a49b35ea28 100644 --- a/core/src/mindustry/world/meta/Stat.java +++ b/core/src/mindustry/world/meta/Stat.java @@ -55,6 +55,10 @@ public enum Stat{ linkRange(StatCat.crafting), instructions(StatCat.crafting), + weapons(StatCat.function), + mirrored(StatCat.function), + bullet(StatCat.function), + speedIncrease(StatCat.function), repairTime(StatCat.function), range(StatCat.function), diff --git a/core/src/mindustry/world/meta/values/AmmoListValue.java b/core/src/mindustry/world/meta/values/AmmoListValue.java index 359b958a96..3900b238bb 100644 --- a/core/src/mindustry/world/meta/values/AmmoListValue.java +++ b/core/src/mindustry/world/meta/values/AmmoListValue.java @@ -10,6 +10,7 @@ import mindustry.content.*; import mindustry.ctype.*; import mindustry.entities.bullet.*; import mindustry.gen.*; +import mindustry.type.*; import mindustry.ui.*; import mindustry.world.meta.*; @@ -28,8 +29,10 @@ public class AmmoListValue implements StatValue{ table.row(); for(T t : map.keys()){ BulletType type = map.get(t); - table.image(icon(t)).size(3 * 8).padRight(4).right().top(); - table.add(t.localizedName).padRight(10).left().top(); + if(!(t instanceof UnitType)){ + table.image(icon(t)).size(3 * 8).padRight(4).right().top(); + table.add(t.localizedName).padRight(10).left().top(); + } table.table(Tex.underline, bt -> { bt.left().defaults().padRight(3).left();