diff --git a/core/assets-raw/sprites/blocks/turrets/afflict/afflict.png b/core/assets-raw/sprites/blocks/turrets/afflict/afflict.png index 69f2a1b065..bc1d57ddc0 100644 Binary files a/core/assets-raw/sprites/blocks/turrets/afflict/afflict.png and b/core/assets-raw/sprites/blocks/turrets/afflict/afflict.png differ diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index 0b0c437c71..040dd3704e 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -190,7 +190,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ if(block == Blocks.air) block = Blocks.yellowStoneWall; } - if(floor == Blocks.yellowStonePlates && noise(x + 78 + y, y, 3, 0.8f, 7f, 1f) > 0.41f){ + if(floor == Blocks.yellowStonePlates && noise(x + 78 + y, y, 3, 0.8f, 6f, 1f) > 0.44f){ floor = Blocks.yellowStone; } }); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 57a9604607..867ec87dfc 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -320,7 +320,7 @@ public class UnitType extends UnlockableContent{ stats.add(Stat.health, health); stats.add(Stat.armor, armor); stats.add(Stat.speed, speed * 60f / tilesize, StatUnit.tilesSecond); - stats.add(Stat.size, hitSize / tilesize, StatUnit.blocksSquared); + stats.add(Stat.size, StatValues.squared(hitSize / tilesize, StatUnit.blocksSquared)); stats.add(Stat.itemCapacity, itemCapacity); stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks); stats.add(Stat.commandLimit, commandLimit); @@ -349,7 +349,7 @@ public class UnitType extends UnlockableContent{ stats.addPercent(Stat.buildSpeed, buildSpeed); } if(inst instanceof Payloadc){ - stats.add(Stat.payloadCapacity, (payloadCapacity / (tilesize * tilesize)), StatUnit.blocksSquared); + stats.add(Stat.payloadCapacity, StatValues.squared(Mathf.sqrt(payloadCapacity / (tilesize * tilesize)), StatUnit.blocksSquared)); } var reqs = getFirstRequirements(); diff --git a/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java b/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java index 1e682f2824..6880b6662a 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java @@ -54,7 +54,7 @@ public class PayloadConveyor extends Block{ public void setStats(){ super.setStats(); - stats.add(Stat.payloadCapacity, (payloadLimit), StatUnit.blocksSquared); + stats.add(Stat.payloadCapacity, StatValues.squared(payloadLimit, StatUnit.blocksSquared)); } @Override diff --git a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java index 1aa6e3100c..02eaa64955 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadMassDriver.java @@ -78,7 +78,7 @@ public class PayloadMassDriver extends PayloadBlock{ public void setStats(){ super.setStats(); - stats.add(Stat.payloadCapacity, maxPayloadSize, StatUnit.blocksSquared); + stats.add(Stat.payloadCapacity, StatValues.squared(maxPayloadSize, StatUnit.blocksSquared)); stats.add(Stat.reload, 60f / (chargeTime + reloadTime), StatUnit.seconds); } diff --git a/core/src/mindustry/world/meta/StatValues.java b/core/src/mindustry/world/meta/StatValues.java index 064bd095aa..7f0ad1e1bf 100644 --- a/core/src/mindustry/world/meta/StatValues.java +++ b/core/src/mindustry/world/meta/StatValues.java @@ -34,11 +34,22 @@ public class StatValues{ return table -> table.add(!value ? "@no" : "@yes"); } + public static String fixValue(float value){ + int precision = Math.abs((int)value - value) <= 0.001f ? 0 : Math.abs((int)(value * 10) - value * 10) <= 0.001f ? 1 : 2; + return Strings.fixed(value, precision); + } + + public static StatValue squared(float value, StatUnit unit){ + return table -> { + String fixed = fixValue(value); + table.add(fixed + "x" + fixed); + table.add((unit.space ? " " : "") + unit.localized()); + }; + } + public static StatValue number(float value, StatUnit unit, boolean merge){ return table -> { - int precision = Math.abs((int)value - value) <= 0.001f ? 0 : Math.abs((int)(value * 10) - value * 10) <= 0.001f ? 1 : 2; - - String l1 = Strings.fixed(value, precision), l2 = (unit.space ? " " : "") + unit.localized(); + String l1 = fixValue(value), l2 = (unit.space ? " " : "") + unit.localized(); if(merge){ table.add(l1 + l2);