v1.4.0: dropped support for pre-1.0.3 saves
This commit is contained in:
@@ -108,8 +108,8 @@ public class GamesInProgress {
|
|||||||
info.slot = slot;
|
info.slot = slot;
|
||||||
Dungeon.preview(info, bundle);
|
Dungeon.preview(info, bundle);
|
||||||
|
|
||||||
//saves from before v0.9.3c are not supported
|
//saves from before v1.0.3 are not supported
|
||||||
if (info.version < ShatteredPixelDungeon.v0_9_3c) {
|
if (info.version < ShatteredPixelDungeon.v1_0_3) {
|
||||||
info = null;
|
info = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-12
@@ -35,13 +35,11 @@ import com.watabou.utils.PlatformSupport;
|
|||||||
public class ShatteredPixelDungeon extends Game {
|
public class ShatteredPixelDungeon extends Game {
|
||||||
|
|
||||||
//variable constants for specific older versions of shattered, used for data conversion
|
//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
|
//versions older than v1.0.3 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
|
|
||||||
|
|
||||||
public static final int v1_0_3 = 574;
|
public static final int v1_0_3 = 574;
|
||||||
public static final int v1_1_2 = 588;
|
public static final int v1_1_2 = 588;
|
||||||
public static final int v1_2_3 = 628;
|
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 ) {
|
public ShatteredPixelDungeon( PlatformSupport platform ) {
|
||||||
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
||||||
@@ -92,14 +90,6 @@ public class ShatteredPixelDungeon extends Game {
|
|||||||
com.watabou.utils.Bundle.addAlias(
|
com.watabou.utils.Bundle.addAlias(
|
||||||
ScrollOfMetamorphosis.class,
|
ScrollOfMetamorphosis.class,
|
||||||
"com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPolymorph" );
|
"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" );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,19 +202,9 @@ public enum Document {
|
|||||||
if (docsBundle.contains(doc.name())){
|
if (docsBundle.contains(doc.name())){
|
||||||
Bundle pagesBundle = docsBundle.getBundle(doc.name());
|
Bundle pagesBundle = docsBundle.getBundle(doc.name());
|
||||||
|
|
||||||
//compatibility with pre-1.0.0 saves
|
for (String page : doc.pageNames()) {
|
||||||
if (pagesBundle.isNull()) {
|
if (pagesBundle.contains(page)) {
|
||||||
for (String page : docsBundle.getStringArray(doc.name())){
|
doc.pagesStates.put(page, pagesBundle.getInt(page));
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,8 +324,8 @@ public abstract class Level implements Bundlable {
|
|||||||
|
|
||||||
version = bundle.getInt( VERSION );
|
version = bundle.getInt( VERSION );
|
||||||
|
|
||||||
//saves from before v0.9.3c are not supported
|
//saves from before v1.0.3 are not supported
|
||||||
if (version < ShatteredPixelDungeon.v0_9_3c){
|
if (version < ShatteredPixelDungeon.v1_0_3){
|
||||||
throw new RuntimeException("old save");
|
throw new RuntimeException("old save");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-11
@@ -53,7 +53,7 @@ import java.util.Collections;
|
|||||||
|
|
||||||
public class WelcomeScene extends PixelScene {
|
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
|
@Override
|
||||||
public void create() {
|
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
|
//defaults to false for older users
|
||||||
if (previousVersion <= ShatteredPixelDungeon.v1_2_3){
|
if (previousVersion <= ShatteredPixelDungeon.v1_2_3){
|
||||||
SPDSettings.quickSwapper(false);
|
SPDSettings.quickSwapper(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user