From 6dae41e32099fc8c1085ea35b11b4957d8ab6174 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 15 May 2025 19:59:55 -0400 Subject: [PATCH] v3.1.0: fixed/minimized a score conversion error from old saves --- .../shatteredpixel/shatteredpixeldungeon/Statistics.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java index f50f5ac94..b130f56e1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java @@ -228,9 +228,12 @@ public class Statistics { floorsExplored.clear(); for (int i = 1; i < 26; i++){ if (bundle.contains( FLR_EXPL+i )){ - floorsExplored.put(i, bundle.getFloat( FLR_EXPL+i )); + //we have this check to reduce an error with bad conversion specifically in v3.1-BETA-1.0 + if (!Dungeon.bossLevel(i) && i <= deepestFloor){ + floorsExplored.put(i, bundle.getFloat( FLR_EXPL+i )); + } //pre-3.1 saves. The bundle key does have an underscore and is a boolean - } else if (bundle.contains( "flr_expl"+1 )){ + } else if (bundle.contains( "flr_expl"+i )){ floorsExplored.put(i, bundle.getBoolean( "flr_expl"+i ) ? 1f : 0f); } }