Module tier stat display (#7054)
This commit is contained in:
@@ -792,6 +792,7 @@ stat.repairtime = Block Full Repair Time
|
|||||||
stat.repairspeed = Repair Speed
|
stat.repairspeed = Repair Speed
|
||||||
stat.weapons = Weapons
|
stat.weapons = Weapons
|
||||||
stat.bullet = Bullet
|
stat.bullet = Bullet
|
||||||
|
stat.moduletier = Module Tier
|
||||||
stat.speedincrease = Speed Increase
|
stat.speedincrease = Speed Increase
|
||||||
stat.range = Range
|
stat.range = Range
|
||||||
stat.drilltier = Drillables
|
stat.drilltier = Drillables
|
||||||
|
|||||||
@@ -133,7 +133,9 @@ public class UnitAssembler extends PayloadBlock{
|
|||||||
stats.add(Stat.output, table -> {
|
stats.add(Stat.output, table -> {
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
|
int tier = 0;
|
||||||
for(var plan : plans){
|
for(var plan : plans){
|
||||||
|
int ttier = tier;
|
||||||
table.table(t -> {
|
table.table(t -> {
|
||||||
t.setBackground(Tex.whiteui);
|
t.setBackground(Tex.whiteui);
|
||||||
t.setColor(Pal.darkestGray);
|
t.setColor(Pal.darkestGray);
|
||||||
@@ -146,9 +148,14 @@ public class UnitAssembler extends PayloadBlock{
|
|||||||
if(plan.unit.unlockedNow()){
|
if(plan.unit.unlockedNow()){
|
||||||
t.image(plan.unit.uiIcon).size(40).pad(10f).left();
|
t.image(plan.unit.uiIcon).size(40).pad(10f).left();
|
||||||
t.table(info -> {
|
t.table(info -> {
|
||||||
info.add(plan.unit.localizedName).left();
|
info.defaults().left();
|
||||||
|
info.add(plan.unit.localizedName);
|
||||||
info.row();
|
info.row();
|
||||||
info.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray);
|
info.add(Strings.autoFixed(plan.time / 60f, 1) + " " + Core.bundle.get("unit.seconds")).color(Color.lightGray);
|
||||||
|
if(ttier > 0){
|
||||||
|
info.row();
|
||||||
|
info.add(Stat.moduleTier.localized() + ": " + ttier).color(Color.lightGray);
|
||||||
|
}
|
||||||
}).left();
|
}).left();
|
||||||
|
|
||||||
t.table(req -> {
|
t.table(req -> {
|
||||||
@@ -167,6 +174,7 @@ public class UnitAssembler extends PayloadBlock{
|
|||||||
}
|
}
|
||||||
}).growX().pad(5);
|
}).growX().pad(5);
|
||||||
table.row();
|
table.row();
|
||||||
|
tier++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ public class UnitAssemblerModule extends PayloadBlock{
|
|||||||
acceptsPayload = true;
|
acceptsPayload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setStats(){
|
||||||
|
super.setStats();
|
||||||
|
|
||||||
|
stats.add(Stat.moduleTier, tier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
super.drawPlace(x, y, rotation, valid);
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public class Stat implements Comparable<Stat>{
|
|||||||
ammoUse = new Stat("ammoUse", StatCat.function),
|
ammoUse = new Stat("ammoUse", StatCat.function),
|
||||||
shieldHealth = new Stat("shieldHealth", StatCat.function),
|
shieldHealth = new Stat("shieldHealth", StatCat.function),
|
||||||
cooldownTime = new Stat("cooldownTime", StatCat.function),
|
cooldownTime = new Stat("cooldownTime", StatCat.function),
|
||||||
|
moduleTier = new Stat("moduletier", StatCat.function),
|
||||||
|
|
||||||
booster = new Stat("booster", StatCat.optional),
|
booster = new Stat("booster", StatCat.optional),
|
||||||
boostEffect = new Stat("boostEffect", StatCat.optional),
|
boostEffect = new Stat("boostEffect", StatCat.optional),
|
||||||
|
|||||||
Reference in New Issue
Block a user