From 202426181391741c6da6d91e28bc3eb01bfe6aa7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 13 Jun 2019 17:38:24 -0400 Subject: [PATCH] v0.7.4: fixed shattered pots being lost if the hero has a full inventory --- .../shatteredpixeldungeon/items/Honeypot.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java index 9ad648925..05747a324 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Honeypot.java @@ -70,7 +70,13 @@ public class Honeypot extends Item { detach( hero.belongings.backpack ); - shatter( hero, hero.pos ).collect(); + Item item = shatter( hero, hero.pos ); + if (!item.collect()){ + Dungeon.level.drop(item, hero.pos); + if (item instanceof ShatteredPot){ + ((ShatteredPot) item).dropPot(hero, hero.pos); + } + } hero.next();