Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/content/Blocks.java core/src/mindustry/net/CrashSender.java core/src/mindustry/ui/Links.java core/src/mindustry/ui/dialogs/SchematicsDialog.java core/src/mindustry/world/blocks/power/LightBlock.java gradle.properties
This commit is contained in:
@@ -96,7 +96,7 @@ public class StatValues{
|
||||
for(int i = 0; i < list.size; i++){
|
||||
Item item = list.get(i);
|
||||
|
||||
table.add(timePeriod <= 0 ? new ItemDisplay(item) : new ItemDisplay(item, 0, timePeriod, true)).padRight(5);
|
||||
table.add(timePeriod <= 0 ? new ItemDisplay(item) : new ItemDisplay(item, 1, timePeriod, true)).padRight(5);
|
||||
|
||||
if(i != list.size - 1){
|
||||
table.add("/");
|
||||
@@ -260,6 +260,10 @@ public class StatValues{
|
||||
}
|
||||
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map){
|
||||
return ammo(map, 0);
|
||||
}
|
||||
|
||||
public static <T extends UnlockableContent> StatValue ammo(ObjectMap<T, BulletType> map, int indent){
|
||||
return table -> {
|
||||
|
||||
table.row();
|
||||
@@ -268,12 +272,12 @@ public class StatValues{
|
||||
orderedKeys.sort();
|
||||
|
||||
for(T t : orderedKeys){
|
||||
boolean unit = t instanceof UnitType;
|
||||
boolean compact = t instanceof UnitType || indent > 0;
|
||||
|
||||
BulletType type = map.get(t);
|
||||
|
||||
//no point in displaying unit icon twice
|
||||
if(!unit & !(t instanceof PowerTurret)){
|
||||
if(!compact && !(t instanceof PowerTurret)){
|
||||
table.image(icon(t)).size(3 * 8).padRight(4).right().top();
|
||||
table.add(t.localizedName).padRight(10).left().top();
|
||||
}
|
||||
@@ -297,11 +301,11 @@ public class StatValues{
|
||||
sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1)));
|
||||
}
|
||||
|
||||
if(!unit && !Mathf.equal(type.ammoMultiplier, 1f) && type.displayAmmoMultiplier){
|
||||
if(!compact && !Mathf.equal(type.ammoMultiplier, 1f) && type.displayAmmoMultiplier){
|
||||
sep(bt, Core.bundle.format("bullet.multiplier", (int)type.ammoMultiplier));
|
||||
}
|
||||
|
||||
if(!Mathf.equal(type.reloadMultiplier, 1f)){
|
||||
if(!compact && !Mathf.equal(type.reloadMultiplier, 1f)){
|
||||
sep(bt, Core.bundle.format("bullet.reload", Strings.autoFixed(type.reloadMultiplier, 2)));
|
||||
}
|
||||
|
||||
@@ -310,7 +314,7 @@ public class StatValues{
|
||||
}
|
||||
|
||||
if(type.healPercent > 0f){
|
||||
sep(bt, Core.bundle.format("bullet.healpercent", (int)type.healPercent));
|
||||
sep(bt, Core.bundle.format("bullet.healpercent", Strings.autoFixed(type.healPercent, 2)));
|
||||
}
|
||||
|
||||
if(type.pierce || type.pierceCap != -1){
|
||||
@@ -329,14 +333,17 @@ public class StatValues{
|
||||
sep(bt, Core.bundle.format("bullet.lightning", type.lightning, type.lightningDamage < 0 ? type.damage : type.lightningDamage));
|
||||
}
|
||||
|
||||
if(type.fragBullet != null){
|
||||
sep(bt, "@bullet.frag");
|
||||
}
|
||||
|
||||
if(type.status != StatusEffects.none){
|
||||
sep(bt, (type.minfo.mod == null ? type.status.emoji() : "") + "[stat]" + type.status.localizedName);
|
||||
}
|
||||
}).padTop(unit ? 0 : -9).left().get().background(unit ? null : Tex.underline);
|
||||
|
||||
if(type.fragBullet != null){
|
||||
sep(bt, Core.bundle.format("bullet.frags", type.fragBullets));
|
||||
bt.row();
|
||||
|
||||
ammo(ObjectMap.of(t, type.fragBullet), indent + 1).display(bt);
|
||||
}
|
||||
}).padTop(compact ? 0 : -9).padLeft(indent * 8).left().get().background(compact ? null : Tex.underline);
|
||||
|
||||
table.row();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user