From 77f02b54a91bb9c9ac1b673eb6e678f6bbe9585c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 13 Aug 2015 00:38:25 -0400 Subject: [PATCH] v0.3.1: heaps can now be examined from the fog of war --- .../shatteredpixeldungeon/ui/Toolbar.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java index 2e796bff2..6fe02c269 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java @@ -272,23 +272,21 @@ public class Toolbar extends Component { } if (Dungeon.visible[cell]) { - Mob mob = (Mob) Actor.findChar(cell); if (mob != null) { GameScene.show(new WndInfoMob(mob)); return; } + } - Heap heap = Dungeon.level.heaps.get(cell); - if (heap != null) { - if (heap.type == Heap.Type.FOR_SALE && heap.size() == 1 && heap.peek().price() > 0) { - GameScene.show(new WndTradeItem(heap, false)); - } else { - GameScene.show(new WndInfoItem(heap)); - } - return; + Heap heap = Dungeon.level.heaps.get(cell); + if (heap != null) { + if (heap.type == Heap.Type.FOR_SALE && heap.size() == 1 && heap.peek().price() > 0) { + GameScene.show(new WndTradeItem(heap, false)); + } else { + GameScene.show(new WndInfoItem(heap)); } - + return; } Plant plant = Dungeon.level.plants.get( cell );