v1.4.0: dropped support for pre-1.0.3 saves

This commit is contained in:
Evan Debenham
2022-07-28 23:59:29 -04:00
parent 223de3fef8
commit 15d64a49d7
5 changed files with 10 additions and 40 deletions

View File

@@ -108,8 +108,8 @@ public class GamesInProgress {
info.slot = slot;
Dungeon.preview(info, bundle);
//saves from before v0.9.3c are not supported
if (info.version < ShatteredPixelDungeon.v0_9_3c) {
//saves from before v1.0.3 are not supported
if (info.version < ShatteredPixelDungeon.v1_0_3) {
info = null;
}

View File

@@ -35,13 +35,11 @@ import com.watabou.utils.PlatformSupport;
public class ShatteredPixelDungeon extends Game {
//variable constants for specific older versions of shattered, used for data conversion
//versions older than v0.9.3c are no longer supported, and data from them is ignored
public static final int v0_9_3c = 557; //557 on iOS, 554 on other platforms
//versions older than v1.0.3 are no longer supported, and data from them is ignored
public static final int v1_0_3 = 574;
public static final int v1_1_2 = 588;
public static final int v1_2_3 = 628;
public static final int v1_3_0 = 642;
public static final int v1_3_2 = 648;
public ShatteredPixelDungeon( PlatformSupport platform ) {
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
@@ -92,14 +90,6 @@ public class ShatteredPixelDungeon extends Game {
com.watabou.utils.Bundle.addAlias(
ScrollOfMetamorphosis.class,
"com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPolymorph" );
//pre-v1.0.0
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFear.class,
"com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAffection" );
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepSleep.class,
"com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepenedSleep" );
}

View File

@@ -202,19 +202,9 @@ public enum Document {
if (docsBundle.contains(doc.name())){
Bundle pagesBundle = docsBundle.getBundle(doc.name());
//compatibility with pre-1.0.0 saves
if (pagesBundle.isNull()) {
for (String page : docsBundle.getStringArray(doc.name())){
if (doc.pagesStates.containsKey(page)) {
doc.pagesStates.put(page, READ);
}
}
} else {
for (String page : doc.pageNames()) {
if (pagesBundle.contains(page)) {
doc.pagesStates.put(page, pagesBundle.getInt(page));
}
for (String page : doc.pageNames()) {
if (pagesBundle.contains(page)) {
doc.pagesStates.put(page, pagesBundle.getInt(page));
}
}
}

View File

@@ -324,8 +324,8 @@ public abstract class Level implements Bundlable {
version = bundle.getInt( VERSION );
//saves from before v0.9.3c are not supported
if (version < ShatteredPixelDungeon.v0_9_3c){
//saves from before v1.0.3 are not supported
if (version < ShatteredPixelDungeon.v1_0_3){
throw new RuntimeException("old save");
}

View File

@@ -53,7 +53,7 @@ import java.util.Collections;
public class WelcomeScene extends PixelScene {
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v1_3_0;
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v1_3_2;
@Override
public void create() {
@@ -240,16 +240,6 @@ public class WelcomeScene extends PixelScene {
}
//if the player has beaten Goo, automatically give all guidebook pages
if (previousVersion <= ShatteredPixelDungeon.v0_9_3c){
Badges.loadGlobal();
if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1)){
for (String page : Document.ADVENTURERS_GUIDE.pageNames()){
Document.ADVENTURERS_GUIDE.readPage(page);
}
}
}
//defaults to false for older users
if (previousVersion <= ShatteredPixelDungeon.v1_2_3){
SPDSettings.quickSwapper(false);