diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java index 0860ba1fa..760a3ebad 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java @@ -102,8 +102,8 @@ public class GamesInProgress { info.slot = slot; Dungeon.preview(info, bundle); - //saves from before v0.8.0b are not supported - if (info.version < ShatteredPixelDungeon.v0_8_0b) { + //saves from before v0.9.0b are not supported + if (info.version < ShatteredPixelDungeon.v0_9_0b) { info = null; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 545d5667f..a2b0446ba 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -34,11 +34,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.8.0b are no longer supported, and data from them is ignored - public static final int v0_8_0b = 414; - public static final int v0_8_1a = 422; - public static final int v0_8_2d = 463; - + //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; public static final int v0_9_2b = 531; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java index 68b00e267..46c61b068 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java @@ -152,46 +152,19 @@ public class Belongings implements Iterable { backpack.restoreFromBundle( bundle ); weapon = (KindOfWeapon) bundle.get(WEAPON); - if (weapon() != null) { - weapon().activate(owner); - } + if (weapon() != null) weapon().activate(owner); armor = (Armor)bundle.get( ARMOR ); - if (armor() != null){ - armor().activate( owner ); - } + if (armor() != null) armor().activate( owner ); - //pre-0.8.2 - if (bundle.contains("misc1") || bundle.contains("misc2")){ - artifact = null; - misc = null; - ring = null; + artifact = (Artifact) bundle.get(ARTIFACT); + if (artifact() != null) artifact().activate(owner); - KindofMisc m = (KindofMisc)bundle.get("misc1"); - if (m instanceof Artifact){ - artifact = (Artifact) m; - } else if (m instanceof Ring) { - ring = (Ring) m; - } + misc = (KindofMisc) bundle.get(MISC); + if (misc() != null) misc().activate( owner ); - m = (KindofMisc)bundle.get("misc2"); - if (m instanceof Artifact){ - if (artifact == null) artifact = (Artifact) m; - else misc = (Artifact) m; - } else if (m instanceof Ring) { - if (ring == null) ring = (Ring) m; - else misc = (Ring) m; - } - - } else { - artifact = (Artifact) bundle.get(ARTIFACT); - misc = (KindofMisc) bundle.get(MISC); - ring = (Ring) bundle.get(RING); - } - - if (artifact() != null) artifact().activate(owner); - if (misc() != null) misc().activate( owner ); - if (ring() != null) ring().activate( owner ); + ring = (Ring) bundle.get(RING); + if (ring() != null) ring().activate( owner ); } public static void preview( GamesInProgress.Info info, Bundle bundle ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index 95aa2f529..2096b99dc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -674,18 +674,6 @@ public class Generator { } } } - - //pre-0.8.1 - if (bundle.contains("spawned_artifacts")) { - for (Class artifact : bundle.getClassArray("spawned_artifacts")) { - Category cat = Category.ARTIFACT; - for (int i = 0; i < cat.classes.length; i++) { - if (cat.classes[i].equals(artifact)) { - cat.probs[i] = 0; - } - } - } - } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java index b40e4b036..c9aa5c4ae 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java @@ -334,21 +334,15 @@ public enum Catalog { } //general save/load - //includes "catalogs" for pre-0.8.2 saves - if (bundle.contains("catalogs") || bundle.contains(CATALOG_ITEMS)) { + if (bundle.contains(CATALOG_ITEMS)) { List seenClasses = new ArrayList<>(); if (bundle.contains(CATALOG_ITEMS)) { seenClasses = Arrays.asList(bundle.getClassArray(CATALOG_ITEMS)); } - List seenItems = new ArrayList<>(); - if (bundle.contains("catalogs")) { - Journal.saveNeeded = true; //we want to overwrite with the newer storage format - seenItems = Arrays.asList(bundle.getStringArray("catalogs")); - } for (Catalog cat : values()) { for (Class item : cat.items()) { - if (seenClasses.contains(item) || seenItems.contains(item.getSimpleName())) { + if (seenClasses.contains(item)) { cat.seen.put(item, true); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index 80593ed33..0d8039a89 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -157,20 +157,6 @@ public class CavesBossLevel extends Level { customArenaVisuals = (ArenaVisuals) c; } } - - //pre-0.8.1 saves that may not have had pylons added - int gatePos = pointToCell(new Point(gate.left, gate.top)); - if (!locked && solid[gatePos]){ - - for (int i : pylonPositions) { - if (findMob(i) == null) { - Pylon pylon = new Pylon(); - pylon.pos = i; - mobs.add(pylon); - } - } - - } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index c2cfd616c..21e170655 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -309,8 +309,8 @@ public abstract class Level implements Bundlable { version = bundle.getInt( VERSION ); - //saves from before v0.8.0b are not supported - if (version < ShatteredPixelDungeon.v0_8_0b){ + //saves from before v0.9.0b are not supported + if (version < ShatteredPixelDungeon.v0_9_0b){ throw new RuntimeException("old save"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index 94b1c8f1d..2fc65a93a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -75,7 +75,6 @@ public class PrisonBossLevel extends Level { public enum State { START, FIGHT_START, - TRAP_MAZES, //pre-0.8.1 saves FIGHT_PAUSE, FIGHT_ARENA, WON @@ -118,7 +117,7 @@ public class PrisonBossLevel extends Level { state = bundle.getEnum( STATE, State.class ); //in some states tengu won't be in the world, in others he will be. - if (state == State.START || state == State.TRAP_MAZES || state == State.FIGHT_PAUSE) { + if (state == State.START || state == State.FIGHT_PAUSE) { tengu = (Tengu)bundle.get( TENGU ); } else { for (Mob mob : mobs){ @@ -417,7 +416,6 @@ public class PrisonBossLevel extends Level { state = State.FIGHT_PAUSE; break; - case TRAP_MAZES: //for pre-0.8.1 saves case FIGHT_PAUSE: Dungeon.hero.interrupt(); @@ -503,7 +501,6 @@ public class PrisonBossLevel extends Level { progress(); } break; - case TRAP_MAZES: //pre-0.8.1 case FIGHT_PAUSE: if (cellToPoint(ch.pos).y <= startHallway.top+1){