v0.7.4: fixed shattered pots being lost if the hero has a full inventory

This commit is contained in:
Evan Debenham 2019-06-13 17:38:24 -04:00
parent 6b816e8324
commit 2024261813

View File

@ -70,7 +70,13 @@ public class Honeypot extends Item {
detach( hero.belongings.backpack ); 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(); hero.next();