From e82ea5a5f0af8253ffa9c2dd2546603289f2338b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 17 Feb 2023 13:28:04 -0500 Subject: [PATCH] v2.0.0: fixed buff turns remaining rarely using arabic characters --- .../shatteredpixeldungeon/actors/buffs/Buff.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java index 44b9fbc0d..252f79da3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java @@ -29,7 +29,9 @@ import com.watabou.noosa.Image; import com.watabou.utils.Reflection; import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.util.HashSet; +import java.util.Locale; public class Buff extends Actor { @@ -133,7 +135,7 @@ public class Buff extends Actor { //to handle the common case of showing how many turns are remaining in a buff description. protected String dispTurns(float input){ - return new DecimalFormat("#.##").format(input); + return new DecimalFormat("#.##", DecimalFormatSymbols.getInstance(Locale.ENGLISH)).format(input); } //buffs act after the hero, so it is often useful to use cooldown+1 when display buff time remaining