From 651cc8631a7f9ae9156dc6dd16828f69765561df Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 30 Jun 2024 14:38:31 -0400 Subject: [PATCH] v2.5.0: fixed sealed level resetting not clearing bomb fuses --- .../shatteredpixeldungeon/levels/Level.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ec098d14d..189fe911e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -64,6 +64,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Stylus; import com.shatteredpixel.shatteredpixeldungeon.items.Torch; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment; @@ -613,7 +614,14 @@ public abstract class Level implements Bundlable { public ArrayList getItemsToPreserveFromSealedResurrect(){ ArrayList items = new ArrayList<>(); for (Heap h : heaps.valueList()){ - if (h.type == Heap.Type.HEAP) items.addAll(h.items); + if (h.type == Heap.Type.HEAP) { + for (Item i : h.items){ + if (i instanceof Bomb){ + ((Bomb) i).fuse = null; + } + items.add(i); + } + } } for (Mob m : mobs){ for (PinCushion b : m.buffs(PinCushion.class)){