From c74cabeee69c86aee20feb4eb4f2c3e9756767ec Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 8 Jan 2015 14:52:02 -0500 Subject: [PATCH] v0.2.3c: modified welcome scene to force load rankings when a user with potentially old ranking info starts the game up. Should eliminate all cases where loading old rankings were conflicting with a running game. --- .../shatteredpixeldungeon/scenes/WelcomeScene.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index cc377869a..99d85f57f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -1,6 +1,7 @@ //TODO: update this class with relevant info as new versions come out. package com.shatteredpixel.shatteredpixeldungeon.scenes; +import com.shatteredpixel.shatteredpixeldungeon.Rankings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ui.Archs; import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; @@ -88,6 +89,11 @@ public class WelcomeScene extends PixelScene { RedButton okay = new RedButton("Okay!") { @Override protected void onClick() { + //imports new ranking data for pre-0.2.3 saves. + if (gameversion < 29){ + Rankings.INSTANCE.load(); + Rankings.INSTANCE.save(); + } ShatteredPixelDungeon.version(Game.versionCode); Game.switchScene(TitleScene.class); }