initial implementation
This commit is contained in:
@@ -229,6 +229,8 @@ public class UnitType extends UnlockableContent{
|
|||||||
if(inst instanceof Payloadc){
|
if(inst instanceof Payloadc){
|
||||||
stats.add(Stat.payloadCapacity, (payloadCapacity / (tilesize * tilesize)), StatUnit.blocksSquared);
|
stats.add(Stat.payloadCapacity, (payloadCapacity / (tilesize * tilesize)), StatUnit.blocksSquared);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stats.add(Stat.weapons, new WeaponListValue(this, weapons));
|
||||||
}
|
}
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ public enum Stat{
|
|||||||
linkRange(StatCat.crafting),
|
linkRange(StatCat.crafting),
|
||||||
instructions(StatCat.crafting),
|
instructions(StatCat.crafting),
|
||||||
|
|
||||||
|
weapons(StatCat.function),
|
||||||
|
mirrored(StatCat.function),
|
||||||
|
bullet(StatCat.function),
|
||||||
|
|
||||||
speedIncrease(StatCat.function),
|
speedIncrease(StatCat.function),
|
||||||
repairTime(StatCat.function),
|
repairTime(StatCat.function),
|
||||||
range(StatCat.function),
|
range(StatCat.function),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import mindustry.content.*;
|
|||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
@@ -28,8 +29,10 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
|
|||||||
table.row();
|
table.row();
|
||||||
for(T t : map.keys()){
|
for(T t : map.keys()){
|
||||||
BulletType type = map.get(t);
|
BulletType type = map.get(t);
|
||||||
|
if(!(t instanceof UnitType)){
|
||||||
table.image(icon(t)).size(3 * 8).padRight(4).right().top();
|
table.image(icon(t)).size(3 * 8).padRight(4).right().top();
|
||||||
table.add(t.localizedName).padRight(10).left().top();
|
table.add(t.localizedName).padRight(10).left().top();
|
||||||
|
}
|
||||||
table.table(Tex.underline, bt -> {
|
table.table(Tex.underline, bt -> {
|
||||||
bt.left().defaults().padRight(3).left();
|
bt.left().defaults().padRight(3).left();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user