From 82f8e78ec88de06135d3522be9a7f1efe8bd5f82 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 18 Jan 2021 18:04:16 -0500 Subject: [PATCH] Fixed various rounding errors in database --- core/src/mindustry/ui/LiquidDisplay.java | 4 ++-- core/src/mindustry/world/meta/values/AmmoListValue.java | 4 ++-- core/src/mindustry/world/meta/values/BoosterListValue.java | 2 +- core/src/mindustry/world/meta/values/WeaponListValue.java | 2 +- gradle.properties | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/mindustry/ui/LiquidDisplay.java b/core/src/mindustry/ui/LiquidDisplay.java index c2d71fee25..0a3d7b1716 100644 --- a/core/src/mindustry/ui/LiquidDisplay.java +++ b/core/src/mindustry/ui/LiquidDisplay.java @@ -23,10 +23,10 @@ public class LiquidDisplay extends Table{ if(amount != 0){ Table t = new Table().left().bottom(); - t.add(Strings.autoFixed(amount, 1)).style(Styles.outlineLabel); + t.add(Strings.autoFixed(amount, 2)).style(Styles.outlineLabel); add(t); } - }}).size(8 * 4).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 1).length() > 2 ? 8 : 0)); + }}).size(8 * 4).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 2).length() > 2 ? 8 : 0)); if(perSecond){ add(StatUnit.perSecond.localized()).padLeft(2).padRight(5).color(Color.lightGray).style(Styles.outlineLabel); diff --git a/core/src/mindustry/world/meta/values/AmmoListValue.java b/core/src/mindustry/world/meta/values/AmmoListValue.java index 16c759f110..15db897384 100644 --- a/core/src/mindustry/world/meta/values/AmmoListValue.java +++ b/core/src/mindustry/world/meta/values/AmmoListValue.java @@ -59,11 +59,11 @@ public class AmmoListValue implements StatValue{ } if(!Mathf.equal(type.reloadMultiplier, 1f)){ - sep(bt, Core.bundle.format("bullet.reload", Strings.fixed(type.reloadMultiplier, 1))); + sep(bt, Core.bundle.format("bullet.reload", Strings.autoFixed(type.reloadMultiplier, 2))); } if(type.knockback > 0){ - sep(bt, Core.bundle.format("bullet.knockback", Strings.fixed(type.knockback, 1))); + sep(bt, Core.bundle.format("bullet.knockback", Strings.autoFixed(type.knockback, 2))); } if(type.healPercent > 0f){ diff --git a/core/src/mindustry/world/meta/values/BoosterListValue.java b/core/src/mindustry/world/meta/values/BoosterListValue.java index 8d3315adaa..6f08fc9eac 100644 --- a/core/src/mindustry/world/meta/values/BoosterListValue.java +++ b/core/src/mindustry/world/meta/values/BoosterListValue.java @@ -40,7 +40,7 @@ public class BoosterListValue implements StatValue{ float reloadRate = (baseReload ? 1f : 0f) + maxUsed * multiplier * liquid.heatCapacity; float standardReload = baseReload ? reload : reload / (maxUsed * multiplier * 0.4f); float result = standardReload / (reload / reloadRate); - bt.add(Core.bundle.format("bullet.reload", Strings.fixed(result, 1))); + bt.add(Core.bundle.format("bullet.reload", Strings.autoFixed(result, 2))); }).left().padTop(-9); c.row(); } diff --git a/core/src/mindustry/world/meta/values/WeaponListValue.java b/core/src/mindustry/world/meta/values/WeaponListValue.java index 706077b967..6833837f5c 100644 --- a/core/src/mindustry/world/meta/values/WeaponListValue.java +++ b/core/src/mindustry/world/meta/values/WeaponListValue.java @@ -39,7 +39,7 @@ public class WeaponListValue implements StatValue{ if(weapon.inaccuracy > 0){ sep(w, "[lightgray]" + Stat.inaccuracy.localized() + ": [white]" + (int)weapon.inaccuracy + " " + StatUnit.degrees.localized()); } - sep(w, "[lightgray]" + Stat.reload.localized() + ": " + (weapon.mirror ? "2x " : "") + "[white]" + Strings.autoFixed(60f / weapon.reload * weapon.shots, 1)); + sep(w, "[lightgray]" + Stat.reload.localized() + ": " + (weapon.mirror ? "2x " : "") + "[white]" + Strings.autoFixed(60f / weapon.reload * weapon.shots, 2)); var bullet = new AmmoListValue(OrderedMap.of(unit, weapon.bullet)); bullet.display(w); diff --git a/gradle.properties b/gradle.properties index caeb2227d2..9088d4b5c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=25dcd2f7664f3c5a669447fdf8dffaea7e65fe0d +archash=08046a31abc93a2628d02e402e98100f2842c72f