v0.3.5: adjusted logic for picking up items at full inventory

This commit is contained in:
Evan Debenham
2016-04-15 15:30:14 -04:00
parent e883272242
commit 1f40d6289c
2 changed files with 15 additions and 10 deletions
@@ -592,9 +592,10 @@ public class Hero extends Char {
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null) {
Item item = heap.pickUp();
Item item = heap.peek();
if (item.doPickUp( this )) {
heap.pickUp();
if (item instanceof Dewdrop
|| item instanceof TimekeepersHourglass.sandBag
|| item instanceof DriedRose.Petal) {
@@ -610,13 +611,13 @@ public class Hero extends Char {
GLog.i( Messages.get(this, "you_now_have", item.name()) );
}
}
if (!heap.isEmpty()) {
GLog.i( Messages.get(this, "something_else") );
}
curAction = null;
} else {
Dungeon.level.drop( item, pos ).sprite.drop();
heap.sprite.drop();
ready();
}
} else {