From 87023151a733fc09fb2cbdf22a034434bef6f856 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 13 Jul 2022 15:31:17 -0400 Subject: [PATCH] v1.3.2: fixed lit bombs being thrown in with other preserved items --- .../shatteredpixeldungeon/levels/PrisonBossLevel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 be6f1fcf1..95183d7cb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.HeavyBoomerang; import com.shatteredpixel.shatteredpixeldungeon.levels.features.LevelTransition; @@ -334,7 +335,11 @@ public class PrisonBossLevel extends Level { private void clearEntities(Rect safeArea){ for (Heap heap : heaps.valueList()){ if (safeArea == null || !safeArea.inside(cellToPoint(heap.pos))){ - storedItems.addAll(heap.items); + for (Item item : heap.items){ + if (!(item instanceof Bomb) || ((Bomb)item).fuse == null){ + storedItems.add(item); + } + } heap.destroy(); } }