From 0c6837686342eb7bb86dab01c186d0ff06779432 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 15 Dec 2015 19:13:53 -0500 Subject: [PATCH] v0.3.3: tweaked how items auto-pickup --- .../shatteredpixeldungeon/actors/hero/Hero.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 84ddd27dd..77d11a21e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -1056,8 +1056,10 @@ public class Hero extends Char { } else { curAction = new HeroAction.Attack( ch ); } - - } else if ((heap = Dungeon.level.heaps.get( cell )) != null) { + + } else if ((heap = Dungeon.level.heaps.get( cell )) != null + //moving to an item doesn't auto-pickup when enemies are near. + && (visibleEnemies.size() == 0 || cell == pos)) { switch (heap.type) { case HEAP: