diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 9badde7ac..fcb78de56 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -36,7 +36,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.levels.CavesBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.CavesLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.CityBossLevel; @@ -307,15 +306,6 @@ public class Dungeon { Light light = hero.buff( Light.class ); hero.viewDistance = light == null ? level.viewDistance : Math.max( Light.DISTANCE, level.viewDistance ); - - //logic for pre 0.3.0 saves, need to give mages a staff. - if (Dungeon.version <= 38 && Dungeon.hero.heroClass == HeroClass.MAGE){ - MagesStaff staff = new MagesStaff(); - staff.identify(); - if (!staff.collect(Dungeon.hero.belongings.backpack)){ - Dungeon.level.drop(staff, Dungeon.hero.pos); - } - } observe(); try { @@ -387,11 +377,6 @@ public class Dungeon { private static final String CHAPTERS = "chapters"; private static final String QUESTS = "quests"; private static final String BADGES = "badges"; - - //TODO: to support pre-0.2.3 saves, remove when needed - private static final String POS = "potionsOfStrength"; - private static final String SOU = "scrollsOfEnhancement"; - private static final String AS = "arcaneStyli"; public static String gameFile( HeroClass cl ) { switch (cl) { @@ -549,21 +534,10 @@ public class Dungeon { if (fullLoad) { transmutation = bundle.getInt( WT ); - //TODO: adjust this when dropping support for pre-0.2.3 saves - if (bundle.contains( LIMDROPS )) { - int[] dropValues = bundle.getIntArray(LIMDROPS); - for (limitedDrops value : limitedDrops.values()) - value.count = value.ordinal() < dropValues.length ? - dropValues[value.ordinal()] : 0; - } else { - for (limitedDrops value : limitedDrops.values()) - value.count = 0; - limitedDrops.strengthPotions.count = bundle.getInt(POS); - limitedDrops.upgradeScrolls.count = bundle.getInt(SOU); - limitedDrops.arcaneStyli.count = bundle.getInt(AS); - } - //for pre-0.2.4 saves - if (bundle.getBoolean(DV)) limitedDrops.dewVial.drop(); + int[] dropValues = bundle.getIntArray(LIMDROPS); + for (limitedDrops value : limitedDrops.values()) + value.count = value.ordinal() < dropValues.length ? + dropValues[value.ordinal()] : 0; chapters = new HashSet(); int ids[] = bundle.getIntArray( CHAPTERS ); @@ -616,14 +590,6 @@ public class Dungeon { droppedItems.put( i, dropped ); } } - - //logic for pre 0.2.4 bags, remove when no longer supporting those saves. - if (version <= 32){ - int deepest = Statistics.deepestFloor; - if (deepest > 15) limitedDrops.wandBag.count = 1; - if (deepest > 10) limitedDrops.scrollBag.count = 1; - if (deepest > 5) limitedDrops.seedBag.count = 1; - } } public static Level loadLevel( HeroClass cl ) throws IOException { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index 2fa650d14..48005ed69 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -67,7 +67,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door; import com.shatteredpixel.shatteredpixeldungeon.levels.features.HighGrass; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap; -import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WornTrap; import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.BlandfruitBush; @@ -361,18 +360,6 @@ public abstract class Level implements Bundlable { } customTiles.add( vis ); } - - //for pre-0.3.1 saves - if (version < 52){ - for (int i=0; i < map.length; i++){ - if (map[i] == Terrain.INACTIVE_TRAP){ - Trap t = new WornTrap().reveal(); - t.active = false; - t.pos = i; - traps.put( i, t); - } - } - } collection = bundle.getCollection( MOBS ); for (Bundlable m : collection) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 407f1d2a8..5bcd5078a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -22,8 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; import android.opengl.GLES20; import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.Badges; -import com.shatteredpixel.shatteredpixeldungeon.Rankings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites; import com.shatteredpixel.shatteredpixeldungeon.effects.Fireball; @@ -146,17 +144,6 @@ public class WelcomeScene extends PixelScene { } private void updateVersion(int previousVersion){ - if (previousVersion <= 32){ - //removes all bags bought badge from pre-0.2.4 saves. - Badges.disown(Badges.Badge.ALL_BAGS_BOUGHT); - Badges.saveGlobal(); - - //imports new ranking data for pre-0.2.3 saves. - if (previousVersion <= 29){ - Rankings.INSTANCE.load(); - Rankings.INSTANCE.save(); - } - } ShatteredPixelDungeon.version(ShatteredPixelDungeon.versionCode); }