diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java index bd5446082..3b6f9c4bd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; @@ -61,6 +62,13 @@ public class CellSelector extends TouchArea { return; } } + + for (Heap heap : Dungeon.level.heaps.values()){ + if (heap.sprite != null && heap.sprite.overlapsPoint( p.x, p.y)){ + select( heap.pos ); + return; + } + } select( ((DungeonTilemap)target).screenToTile( (int)touch.current.x,