From 4b635ca3273317e0db91ea6391ae49ba3d1d1196 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 20 Mar 2023 17:52:41 -0400 Subject: [PATCH] v2.0.1: removed support for v1.0 and v1.1 save data --- .../shatteredpixeldungeon/Badges.java | 9 +- .../shatteredpixeldungeon/Dungeon.java | 18 +--- .../GamesInProgress.java | 4 +- .../ShatteredPixelDungeon.java | 34 +------- .../actors/blobs/Alchemy.java | 10 --- .../items/MerchantsBeacon.java | 82 ----------------- .../shatteredpixeldungeon/items/Recipe.java | 3 - .../items/artifacts/MasterThievesArmband.java | 9 -- .../items/spells/MagicalPorter.java | 87 ------------------- .../shatteredpixeldungeon/levels/Level.java | 4 +- .../levels/rooms/special/ShopRoom.java | 1 - .../scenes/GameScene.java | 19 ---- .../scenes/WelcomeScene.java | 8 -- .../shatteredpixeldungeon/ui/QuickRecipe.java | 1 - .../desktop/DesktopLauncher.java | 10 --- 15 files changed, 7 insertions(+), 292 deletions(-) delete mode 100644 core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java delete mode 100644 core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalPorter.java diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index 7d900c0a9..cf94cbf5c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -229,14 +229,7 @@ public class Badges { private static final HashMap renamedBadges = new HashMap<>(); static{ - //v1.1.0 (some names were from before 1.1.0, but conversion was added then) - renamedBadges.put("BAG_BOUGHT_SEED_POUCH", "BAG_BOUGHT_VELVET_POUCH"); - renamedBadges.put("BAG_BOUGHT_WAND_HOLSTER", "BAG_BOUGHT_MAGICAL_HOLSTER"); - - renamedBadges.put("POTIONS_COOKED_1", "ITEMS_CRAFTED_1"); - renamedBadges.put("POTIONS_COOKED_2", "ITEMS_CRAFTED_2"); - renamedBadges.put("POTIONS_COOKED_3", "ITEMS_CRAFTED_3"); - renamedBadges.put("POTIONS_COOKED_4", "ITEMS_CRAFTED_4"); + //no renamed badges currently } 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 c84bd5729..ba7b4db54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -188,7 +188,6 @@ public class Dungeon { public static HashSet chapters; public static SparseArray> droppedItems; - public static SparseArray> portedItems; //first variable is only assigned when game is started, second is updated every time game is saved public static int initialVersion; @@ -250,7 +249,6 @@ public class Dungeon { energy = 0; droppedItems = new SparseArray<>(); - portedItems = new SparseArray<>(); LimitedDrops.reset(); @@ -558,10 +556,6 @@ public class Dungeon { for (int d : droppedItems.keyArray()) { bundle.put(Messages.format(DROPPED, d), droppedItems.get(d)); } - - for (int p : portedItems.keyArray()){ - bundle.put(Messages.format(PORTED, p), portedItems.get(p)); - } quickslot.storePlaceholders( bundle ); @@ -720,7 +714,6 @@ public class Dungeon { Generator.restoreFromBundle( bundle ); droppedItems = new SparseArray<>(); - portedItems = new SparseArray<>(); for (int i=1; i <= 26; i++) { //dropped items @@ -732,16 +725,7 @@ public class Dungeon { if (!items.isEmpty()) { droppedItems.put( i, items ); } - - //ported items - items = new ArrayList<>(); - if (bundle.contains(Messages.format( PORTED, i ))) - for (Bundlable b : bundle.getCollection( Messages.format( PORTED, i ) ) ) { - items.add( (Item)b ); - } - if (!items.isEmpty()) { - portedItems.put( i, items ); - } + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java index f92fe963b..6745bf9df 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java @@ -108,8 +108,8 @@ public class GamesInProgress { info.slot = slot; Dungeon.preview(info, bundle); - //saves from before v1.0.3 are not supported - if (info.version < ShatteredPixelDungeon.v1_0_3) { + //saves from before v1.2.3 are not supported + if (info.version < ShatteredPixelDungeon.v1_2_3) { 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 7fd879a70..9fd96986c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -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 v1.0.3 are no longer supported, and data from them is ignored - public static final int v1_0_3 = 574; - public static final int v1_1_2 = 588; + //versions older than v1.2.3 are no longer supported, and data from them is ignored public static final int v1_2_3 = 628; public static final int v1_3_2 = 648; public static final int v1_4_3 = 668; @@ -64,36 +62,6 @@ public class ShatteredPixelDungeon extends Game { com.watabou.utils.Bundle.addAlias( com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Explosive.class, "com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Fragile" ); - - //pre-v1.2.0 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.CleansingDart.class, - "com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.SleepDart" ); - - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.CrystalVaultRoom.class, - "com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.VaultRoom" ); - - //pre-v1.1.0 - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfDread.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPetrification" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfSirensSong.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfAffection" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfConfusion" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDivineInspiration.class, - "com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfHolyFuror" ); - com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfMastery.class, - "com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfAdrenalineSurge" ); - com.watabou.utils.Bundle.addAlias( - ScrollOfMetamorphosis.class, - "com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPolymorph" ); - } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java index ff02412c0..8a845225b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Alchemy.java @@ -42,16 +42,6 @@ public class Alchemy extends Blob { if (Dungeon.level.insideMap(cell)) { off[cell] = cur[cell]; - //for pre-v1.1.0 saves, drops 1/4 the pot's old energy contents in crystals - if (off[cell] >= 4){ - int n; - do { - n = cell + PathFinder.NEIGHBOURS8[Random.Int( 8 )]; - } while (!Dungeon.level.passable[n] && !Dungeon.level.avoid[n]); - Dungeon.level.drop( new EnergyCrystal((int)Math.ceil(off[cell]/4f)), n ).sprite.drop( cell ); - off[cell] = 1; - } - volume += off[cell]; if (off[cell] > 0 && Dungeon.level.visited[cell]){ Notes.add( Notes.Landmark.ALCHEMY ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java deleted file mode 100644 index 37a212d65..000000000 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MerchantsBeacon.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Pixel Dungeon - * Copyright (C) 2012-2015 Oleg Dolya - * - * Shattered Pixel Dungeon - * Copyright (C) 2014-2023 Evan Debenham - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package com.shatteredpixel.shatteredpixeldungeon.items; - -import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; -import com.watabou.noosa.audio.Sample; - -import java.util.ArrayList; - -//removed from drops, here for pre-1.1.0 saves -public class MerchantsBeacon extends Item { - - private static final String AC_USE = "USE"; - - { - image = ItemSpriteSheet.BEACON; - - stackable = true; - - defaultAction = AC_USE; - - bones = true; - } - - @Override - public ArrayList actions(Hero hero) { - ArrayList actions = super.actions(hero); - actions.add(AC_USE); - return actions; - } - - @Override - public void execute(Hero hero, String action) { - - super.execute(hero, action); - - if (action.equals(AC_USE)) { - detach( hero.belongings.backpack ); - Shopkeeper.sell(); - Sample.INSTANCE.play( Assets.Sounds.BEACON ); - } - - } - - @Override - public boolean isUpgradable() { - return false; - } - - @Override - public boolean isIdentified() { - return true; - } - - @Override - public int value() { - return 5 * quantity; - } - -} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java index 12e20b618..dcbfe861f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java @@ -22,7 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; -import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.AlchemistsToolkit; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit; import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie; @@ -50,7 +49,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.CurseInfusion; import com.shatteredpixel.shatteredpixeldungeon.items.spells.FeatherFall; import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion; -import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalPorter; import com.shatteredpixel.shatteredpixeldungeon.items.spells.PhaseShift; import com.shatteredpixel.shatteredpixeldungeon.items.spells.ReclaimTrap; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Recycle; @@ -201,7 +199,6 @@ public abstract class Recipe { new CurseInfusion.Recipe(), new FeatherFall.Recipe(), new MagicalInfusion.Recipe(), - new MagicalPorter.Recipe(), new PhaseShift.Recipe(), new ReclaimTrap.Recipe(), new Recycle.Recipe(), diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java index b04a54256..1f82c180b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/MasterThievesArmband.java @@ -252,15 +252,6 @@ public class MasterThievesArmband extends Artifact { return desc; } - @Override - public void restoreFromBundle(Bundle bundle) { - super.restoreFromBundle(bundle); - //conversion for old armband on pre-1.2.0 saves - if (exp > Math.round(10 + level()*3.33f)){ - exp = 0; - } - } - public class Thievery extends ArtifactBuff { @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalPorter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalPorter.java deleted file mode 100644 index d0bcb8779..000000000 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalPorter.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Pixel Dungeon - * Copyright (C) 2012-2015 Oleg Dolya - * - * Shattered Pixel Dungeon - * Copyright (C) 2014-2023 Evan Debenham - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package com.shatteredpixel.shatteredpixeldungeon.items.spells; - -import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.items.Item; -import com.shatteredpixel.shatteredpixeldungeon.items.MerchantsBeacon; -import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; -import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; - -import java.util.ArrayList; - -//beacon was removed from drops, here for pre-1.1.0 saves -public class MagicalPorter extends InventorySpell { - - { - image = ItemSpriteSheet.MAGIC_PORTER; - } - - @Override - protected void onCast(Hero hero) { - if (Dungeon.depth >= 25){ - GLog.w(Messages.get(this, "nowhere")); - } else { - super.onCast(hero); - } - } - - @Override - protected boolean usableOnItem(Item item) { - return !item.isEquipped(Dungeon.hero); - } - - @Override - protected void onItemSelected(Item item) { - - Item result = item.detachAll(curUser.belongings.backpack); - int portDepth = 5 * (1 + Dungeon.depth/5); - ArrayList ported = Dungeon.portedItems.get(portDepth); - if (ported == null) { - Dungeon.portedItems.put(portDepth, ported = new ArrayList<>()); - } - ported.add(result); - - } - - @Override - public int value() { - //prices of ingredients, divided by output quantity - return Math.round(quantity * ((5 + 40) / 8f)); - } - - public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe { - - { - inputs = new Class[]{MerchantsBeacon.class, ArcaneCatalyst.class}; - inQuantity = new int[]{1, 1}; - - cost = 4; - - output = MagicalPorter.class; - outQuantity = 8; - } - - } -} 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 e341c30e3..c874e32f1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -325,8 +325,8 @@ public abstract class Level implements Bundlable { version = bundle.getInt( VERSION ); - //saves from before v1.0.3 are not supported - if (version < ShatteredPixelDungeon.v1_0_3){ + //saves from before v1.2.3 are not supported + if (version < ShatteredPixelDungeon.v1_2_3){ throw new RuntimeException("old save"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/ShopRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/ShopRoom.java index 6fbefd3d3..d4f300d22 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/ShopRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/ShopRoom.java @@ -30,7 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot; import com.shatteredpixel.shatteredpixeldungeon.items.Item; -import com.shatteredpixel.shatteredpixeldungeon.items.MerchantsBeacon; import com.shatteredpixel.shatteredpixeldungeon.items.Stylus; import com.shatteredpixel.shatteredpixeldungeon.items.Torch; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index ee2827eae..f6a10b72f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -451,25 +451,6 @@ public class GameScene extends PixelScene { Dungeon.droppedItems.remove( Dungeon.depth ); } - //pre-1.1.0 saves, including all logic surrounding Dungeon.portedItems - ArrayList ported = Dungeon.portedItems.get( Dungeon.depth ); - if (ported != null){ - //might want to have a 'near entrance' function if items can be ported elsewhere - int pos; - //try to find a tile with no heap, otherwise just stick items onto a heap. - int tries = 100; - do { - pos = Dungeon.level.randomRespawnCell( null ); - tries--; - } while (tries > 0 && Dungeon.level.heaps.get(pos) != null); - for (Item item : ported) { - Dungeon.level.drop( item, pos ).type = Heap.Type.CHEST; - } - Dungeon.level.heaps.get(pos).type = Heap.Type.CHEST; - Dungeon.level.heaps.get(pos).sprite.link(); //sprite reset to show chest - Dungeon.portedItems.remove( Dungeon.depth ); - } - Dungeon.hero.next(); switch (InterlevelScene.mode){ 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 2f4e04a36..1c9ae39b0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -240,17 +240,10 @@ public class WelcomeScene extends PixelScene { //update rankings, to update any data which may be outdated if (previousVersion < LATEST_UPDATE){ try { - Badges.loadGlobal(); //fixing a bug with v1.3.2 saves Rankings.INSTANCE.load(); for (Rankings.Record rec : Rankings.INSTANCE.records.toArray(new Rankings.Record[0])){ try { Rankings.INSTANCE.loadGameData(rec); - if (Statistics.gameWon) { - Badges.unlock(Badges.Badge.VICTORY); - if (Challenges.activeChallenges() >= 1) Badges.unlock(Badges.Badge.CHAMPION_1); - if (Challenges.activeChallenges() >= 3) Badges.unlock(Badges.Badge.CHAMPION_2); - if (Challenges.activeChallenges() >= 6) Badges.unlock(Badges.Badge.CHAMPION_3); - } Rankings.INSTANCE.saveGameData(rec); } catch (Exception e) { //if we encounter a fatal per-record error, then clear that record @@ -270,7 +263,6 @@ public class WelcomeScene extends PixelScene { } Collections.sort(Rankings.INSTANCE.records, Rankings.scoreComparator); Rankings.INSTANCE.save(); - Badges.saveGlobal(); } catch (Exception e) { //if we encounter a fatal error, then just clear the rankings FileUtils.deleteFile( Rankings.RANKINGS_FILE ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java index 28cc95898..f88e47915 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java @@ -58,7 +58,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.CurseInfusion; import com.shatteredpixel.shatteredpixeldungeon.items.spells.FeatherFall; import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion; -import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalPorter; import com.shatteredpixel.shatteredpixeldungeon.items.spells.PhaseShift; import com.shatteredpixel.shatteredpixeldungeon.items.spells.ReclaimTrap; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Recycle; diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java index 3ccd000dc..a30446fb6 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java @@ -161,16 +161,6 @@ public class DesktopLauncher { String titleLinux = title.toLowerCase(Locale.ROOT).replace(" ", "-"); basePath = XDGHome + "/." + vendor + "/" + titleLinux + "/"; - //copy over files from old linux save DIR, pre-1.2.0 - FileHandle oldBase = new Lwjgl3FileHandle("." + vendor + "/" + titleLinux + "/", Files.FileType.External); - FileHandle newBase = new Lwjgl3FileHandle(basePath, Files.FileType.Absolute); - if (oldBase.exists()){ - if (!newBase.exists()) { - oldBase.copyTo(newBase.parent()); - } - oldBase.deleteDirectory(); - oldBase.parent().delete(); //only regular delete, in case of saves from other PD versions - } baseFileType = Files.FileType.Absolute; }