From 72147a297c516516ddd42f93557fff11e0f43357 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 21 Aug 2020 22:54:36 -0400 Subject: [PATCH] v0.8.2c: dropped compatibility from saves prior to v0.7.3b --- .../shatteredpixeldungeon/Badges.java | 8 +-- .../shatteredpixeldungeon/Dungeon.java | 44 +------------ .../GamesInProgress.java | 4 +- .../ShatteredPixelDungeon.java | 66 +------------------ .../shatteredpixeldungeon/actors/Char.java | 14 ---- .../actors/buffs/AdrenalineSurge.java | 7 +- .../actors/buffs/Berserk.java | 14 +--- .../actors/buffs/Ooze.java | 7 +- .../actors/mobs/npcs/MirrorImage.java | 5 -- .../items/armor/Armor.java | 6 -- .../items/armor/glyphs/Brimstone.java | 9 --- .../items/rings/Ring.java | 5 -- .../items/weapon/SpiritBow.java | 9 +-- .../items/weapon/Weapon.java | 10 +-- .../journal/Document.java | 5 -- .../shatteredpixeldungeon/levels/Level.java | 4 +- .../levels/rooms/special/SpecialRoom.java | 8 +-- .../plants/BlandfruitBush.java | 5 +- .../scenes/WelcomeScene.java | 22 ------- 19 files changed, 21 insertions(+), 231 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index ff36bb10a..0e9086eaf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -36,7 +36,6 @@ import com.watabou.utils.FileUtils; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -176,15 +175,12 @@ public class Badges { private static final HashSet removedBadges = new HashSet<>(); static{ - //removed in 0.6.5 - removedBadges.addAll(Arrays.asList("RARE_ALBINO", "RARE_BANDIT", "RARE_SHIELDED", - "RARE_SENIOR", "RARE_ACIDIC", "RARE", "TUTORIAL_WARRIOR", "TUTORIAL_MAGE")); + //no recently removed badges } private static final HashMap renamedBadges = new HashMap<>(); static{ - //0.6.5 - renamedBadges.put("CHAMPION", "CHAMPION_1"); + //no recently renamed badges } public static HashSet restore( Bundle bundle ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index ea3d3ea01..1d6f12e2b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -41,19 +41,17 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesi 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.scrolls.ScrollOfUpgrade; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.levels.CavesLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.CityLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.DeadEndLevel; -import com.shatteredpixel.shatteredpixeldungeon.levels.NewHallsBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.HallsLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.LastLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.LastShopLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.NewCavesBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.NewCityBossLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.NewHallsBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.NewPrisonBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.PrisonLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.SewerBossLevel; @@ -388,35 +386,6 @@ public class Dungeon { hero.curAction = hero.lastAction = null; - //pre-0.7.1 saves. Adjusting for spirit bows in weapon slot or with upgrades. - SpiritBow bow; - if (hero.belongings.weapon instanceof SpiritBow){ - bow = (SpiritBow)hero.belongings.weapon; - hero.belongings.weapon = null; - - if (!bow.collect()){ - level.drop(bow, hero.pos); - } - } else { - bow = hero.belongings.getItem(SpiritBow.class); - } - - //pre-0.7.1 saves. refunding upgrades previously spend on a boomerang - if (bow != null && bow.spentUpgrades() > 0){ - ScrollOfUpgrade refund = new ScrollOfUpgrade(); - refund.quantity(bow.spentUpgrades()); - bow.level(0); - - //to prevent exploits, some SoU are lost in the conversion of a boomerang higher than +1 - if (refund.quantity() > 1){ - refund.quantity(1 + (int)Math.floor((refund.quantity()-1)*0.8f)); - } - - if (!refund.collect()){ - level.drop(refund, hero.pos); - } - } - observe(); try { saveAll(); @@ -643,17 +612,6 @@ public class Dungeon { hero = null; hero = (Hero)bundle.get( HERO ); - - //pre-0.7.0 saves, back when alchemy had a window which could store items - if (bundle.contains("alchemy_inputs")){ - for (Bundlable item : bundle.getCollection("alchemy_inputs")){ - - //try to add normally, force-add otherwise. - if (!((Item)item).collect(hero.belongings.backpack)){ - hero.belongings.backpack.items.add((Item)item); - } - } - } gold = bundle.getInt( GOLD ); depth = bundle.getInt( DEPTH ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java index e72c715bd..886282309 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 0.6.5c are not supported - if (info.version < ShatteredPixelDungeon.v0_6_5c) { + //saves from before v0.7.3b are not supported + if (info.version < ShatteredPixelDungeon.v0_7_3b) { 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 ef932293c..042b44b77 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -30,14 +30,9 @@ import com.watabou.noosa.audio.Sample; 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.6.5c are no longer supported, and data from them is ignored - public static final int v0_6_5c = 264; - - public static final int v0_7_0c = 311; - public static final int v0_7_1d = 323; - public static final int v0_7_2d = 340; + //versions older than v0.7.3b are no longer supported, and data from them is ignored public static final int v0_7_3b = 349; public static final int v0_7_4c = 362; public static final int v0_7_5e = 382; @@ -48,62 +43,7 @@ public class ShatteredPixelDungeon extends Game { public ShatteredPixelDungeon( PlatformSupport platform ) { super( sceneClass == null ? WelcomeScene.class : sceneClass, platform ); - - //v0.7.0 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb.class, - "com.shatteredpixel.shatteredpixeldungeon.items.Bomb" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight.class, - "com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMight" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion" ); - - //v0.7.1 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang" ); - - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Knuckles" ); - - //v0.7.2 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDisarming.class, - "com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDetectCurse" ); - - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Elastic" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Dazzling" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Eldritch" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Stunning" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Venomous" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vorpal" ); - - //v0.7.3 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Precise" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Swift" ); - + //v0.7.5 com.watabou.utils.Bundle.addAlias( com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.SewerBossEntranceRoom.class, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index ae5d52f7f..7facf2810 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -62,10 +62,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Elemental; -import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic; -import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution; @@ -240,18 +238,6 @@ public abstract class Char extends Actor { ((Buff)b).attachTo( this ); } } - - //pre-0.7.0 - if (bundle.contains( "SHLD" )){ - int legacySHLD = bundle.getInt( "SHLD" ); - //attempt to find the buff that may have given the shield - ShieldBuff buff = buff(Brimstone.BrimstoneShield.class); - if (buff != null) legacySHLD -= buff.shielding(); - if (legacySHLD > 0){ - BrokenSeal.WarriorShield buff2 = buff(BrokenSeal.WarriorShield.class); - if (buff != null) buff2.supercharge(legacySHLD); - } - } } public boolean attack( Char enemy ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java index 0db100093..4c2ba90b5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/AdrenalineSurge.java @@ -91,11 +91,6 @@ public class AdrenalineSurge extends Buff { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); boost = bundle.getInt( BOOST ); - //pre-0.7.1 - if (bundle.contains(INTERVAL)) { - interval = bundle.getFloat(INTERVAL); - } else { - interval = 800f; - } + interval = bundle.getFloat(INTERVAL); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java index 354dc7ff8..1f46f70ca 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Berserk.java @@ -60,17 +60,9 @@ public class Berserk extends Buff { @Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); - //pre-0.6.5 saves - if (bundle.contains("exhaustion")){ - state = State.RECOVERING; - } else { - state = bundle.getEnum(STATE, State.class); - } - if (bundle.contains(POWER)){ - power = bundle.getFloat(POWER); - } else { - power = 1f; - } + + state = bundle.getEnum(STATE, State.class); + power = bundle.getFloat(POWER); if (state == State.RECOVERING) levelRecovery = bundle.getFloat(LEVEL_RECOVERY); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java index 8b7472e17..01f4e5365 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java @@ -49,12 +49,7 @@ public class Ooze extends Buff { @Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); - //pre-0.7.0 - if (bundle.contains( LEFT )) { - left = bundle.getFloat(LEFT); - } else { - left = 20; - } + left = bundle.getFloat(LEFT); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java index 2bf4f6345..a64fc7b77 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/MirrorImage.java @@ -175,11 +175,6 @@ public class MirrorImage extends NPC { public CharSprite sprite() { CharSprite s = super.sprite(); - //pre-0.7.0 saves - if (heroID == 0){ - heroID = Dungeon.hero.id(); - } - hero = (Hero)Actor.findById(heroID); if (hero != null) { armTier = hero.tier(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index d4724fcf8..7e7996327 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -140,12 +140,6 @@ public class Armor extends EquipableItem { curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS ); seal = (BrokenSeal)bundle.get(SEAL); - //pre-0.7.2 saves - if (bundle.contains( "unfamiliarity" )){ - usesLeftToID = bundle.getInt( "unfamiliarity" ); - availableUsesToID = USES_TO_ID/2f; - } - augment = bundle.getEnum(AUGMENT, Augment.class); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java index 5088f9901..3072874ff 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Brimstone.java @@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; -import com.watabou.utils.Bundle; public class Brimstone extends Armor.Glyph { @@ -71,14 +70,6 @@ public class Brimstone extends Armor.Glyph { return true; } - @Override - public void restoreFromBundle(Bundle bundle) { - super.restoreFromBundle(bundle); - //pre-0.7.0 - if (bundle.contains("added")){ - setShield(bundle.getInt("added")); - } - } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index cf68bbb77..a316ce407 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -284,11 +284,6 @@ public class Ring extends KindofMisc { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); levelsToID = bundle.getFloat( LEVELS_TO_ID ); - - //pre-0.7.2 saves - if (bundle.contains( "unfamiliarity" )){ - levelsToID = bundle.getInt( "unfamiliarity" ) / 200f; - } } public void onHeroGainExp( float levelPercent, Hero hero ){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java index adfd0660d..5864c8290 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java @@ -196,9 +196,7 @@ public class SpiritBow extends Weapon { @Override public int level() { - //need to check if hero is null for loading an upgraded bow from pre-0.7.0 - return (Dungeon.hero == null ? 0 : Dungeon.hero.lvl/5) - + (curseInfusionBonus ? 1 : 0); + return (Dungeon.hero == null ? 0 : Dungeon.hero.lvl/5) + (curseInfusionBonus ? 1 : 0); } @Override @@ -206,11 +204,6 @@ public class SpiritBow extends Weapon { //level isn't affected by buffs/debuffs return level(); } - - //for fetching upgrades from a boomerang from pre-0.7.1 - public int spentUpgrades() { - return super.level() - (curseInfusionBonus ? 1 : 0); - } @Override public boolean isUpgradable() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index 92b35f919..90fb891e6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -41,10 +41,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazin import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blocking; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blooming; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Corrupting; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Lucky; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Projecting; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking; @@ -148,13 +148,7 @@ abstract public class Weapon extends KindOfWeapon { availableUsesToID = bundle.getInt( AVAILABLE_USES ); enchantment = (Enchantment)bundle.get( ENCHANTMENT ); curseInfusionBonus = bundle.getBoolean( CURSE_INFUSION_BONUS ); - - //pre-0.7.2 saves - if (bundle.contains( "unfamiliarity" )){ - usesLeftToID = bundle.getInt( "unfamiliarity" ); - availableUsesToID = USES_TO_ID/2f; - } - + augment = bundle.getEnum(AUGMENT, Augment.class); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java index d2e0ca86a..bdfe179c3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Document.java @@ -167,11 +167,6 @@ public enum Document { if (doc.pages.containsKey(page)) { doc.pages.put(page, true); } - //pre-0.7.2 saves - else if (page.equals("Brews")){ - doc.pages.put("Catalysts", true); - doc.pages.put("Brews_Elixirs", true); - } } } } 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 7c9e02dae..f75dfefc9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -299,8 +299,8 @@ public abstract class Level implements Bundlable { version = bundle.getInt( VERSION ); - //saves from before 0.6.5c are not supported - if (version < ShatteredPixelDungeon.v0_6_5c){ + //saves from before v0.7.3b are not supported + if (version < ShatteredPixelDungeon.v0_7_3b){ throw new RuntimeException("old save"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SpecialRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SpecialRoom.java index 43e18736a..6fdf711b4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SpecialRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SpecialRoom.java @@ -30,6 +30,7 @@ import com.watabou.utils.Reflection; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; public abstract class SpecialRoom extends Room { @@ -167,12 +168,7 @@ public abstract class SpecialRoom extends Room { public static void restoreRoomsFromBundle( Bundle bundle ) { runSpecials.clear(); if (bundle.contains( ROOMS )) { - for (Class type : bundle.getClassArray(ROOMS)) { - //pre-0.7.0 saves - if (type != null && type != LaboratoryRoom.class) { - runSpecials.add(type); - } - } + Collections.addAll(runSpecials, bundle.getClassArray(ROOMS)); } else { initForRun(); ShatteredPixelDungeon.reportException(new Exception("specials array didn't exist!")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java index d6c210287..7efc4419f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/BlandfruitBush.java @@ -24,7 +24,6 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class BlandfruitBush extends Plant { @@ -37,11 +36,9 @@ public class BlandfruitBush extends Plant { Dungeon.level.drop( new Blandfruit(), pos ).sprite.drop(); } - //This seed no longer drops, but has a sprite as it did drop prior to 0.7.0 + //seed is never dropped public static class Seed extends Plant.Seed { { - image = ItemSpriteSheet.SEED_FADELEAF; - plantClass = BlandfruitBush.class; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 852e3a4bf..c48c96d92 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -21,15 +21,12 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; -import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.Rankings; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites; -import com.shatteredpixel.shatteredpixeldungeon.journal.Document; -import com.shatteredpixel.shatteredpixeldungeon.journal.Journal; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; @@ -183,25 +180,6 @@ public class WelcomeScene extends PixelScene { } } - //give classes to people with saves that have previously unlocked them - if (previousVersion <= ShatteredPixelDungeon.v0_7_0c){ - Badges.loadGlobal(); - Badges.addGlobal(Badges.Badge.UNLOCK_MAGE); - Badges.addGlobal(Badges.Badge.UNLOCK_ROGUE); - if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_3)){ - Badges.addGlobal(Badges.Badge.UNLOCK_HUNTRESS); - } - Badges.saveGlobal(); - } - - if (previousVersion <= ShatteredPixelDungeon.v0_6_5c){ - Journal.loadGlobal(); - Document.ALCHEMY_GUIDE.addPage("Potions"); - Document.ALCHEMY_GUIDE.addPage("Stones"); - Document.ALCHEMY_GUIDE.addPage("Energy_Food"); - Journal.saveGlobal(); - } - SPDSettings.version(ShatteredPixelDungeon.versionCode); }