v1.2.0: dropped support for shattered saves prior to 0.9.2b
This commit is contained in:
@@ -102,8 +102,8 @@ public class GamesInProgress {
|
||||
info.slot = slot;
|
||||
Dungeon.preview(info, bundle);
|
||||
|
||||
//saves from before v0.9.0b are not supported
|
||||
if (info.version < ShatteredPixelDungeon.v0_9_0b) {
|
||||
//saves from before v0.9.2b are not supported
|
||||
if (info.version < ShatteredPixelDungeon.v0_9_2b) {
|
||||
info = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,7 @@ 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.0b are no longer supported, and data from them is ignored
|
||||
public static final int v0_9_0b = 489;
|
||||
public static final int v0_9_1d = 511;
|
||||
//versions older than v0.9.2b are no longer supported, and data from them is ignored
|
||||
public static final int v0_9_2b = 531;
|
||||
public static final int v0_9_3c = 557; //557 on iOS, 554 on other platforms
|
||||
|
||||
|
||||
@@ -160,9 +160,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||
count = bundle.getInt( COUNT );
|
||||
comboTime = bundle.getFloat( TIME );
|
||||
|
||||
//pre-0.9.2
|
||||
if (bundle.contains(INITIAL_TIME)) initialComboTime = bundle.getFloat( INITIAL_TIME );
|
||||
else initialComboTime = 5;
|
||||
initialComboTime = bundle.getFloat( INITIAL_TIME );
|
||||
|
||||
clobberUsed = bundle.getBoolean(CLOBBER_USED);
|
||||
parryUsed = bundle.getBoolean(PARRY_USED);
|
||||
|
||||
@@ -661,10 +661,6 @@ public enum Talent {
|
||||
for (int i = 0; i < MAX_TALENT_TIERS; i++){
|
||||
LinkedHashMap<Talent, Integer> tier = hero.talents.get(i);
|
||||
Bundle tierBundle = bundle.contains(TALENT_TIER+(i+1)) ? bundle.getBundle(TALENT_TIER+(i+1)) : null;
|
||||
//pre-0.9.1 saves
|
||||
if (tierBundle == null && i == 0 && bundle.contains("talents")){
|
||||
tierBundle = bundle.getBundle("talents");
|
||||
}
|
||||
|
||||
if (tierBundle != null){
|
||||
for (Talent talent : tier.keySet()){
|
||||
|
||||
@@ -311,8 +311,8 @@ public abstract class Level implements Bundlable {
|
||||
|
||||
version = bundle.getInt( VERSION );
|
||||
|
||||
//saves from before v0.9.0b are not supported
|
||||
if (version < ShatteredPixelDungeon.v0_9_0b){
|
||||
//saves from before v0.9.2b are not supported
|
||||
if (version < ShatteredPixelDungeon.v0_9_2b){
|
||||
throw new RuntimeException("old save");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user