summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index f43a5130f4..fedea2c60f 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3007,11 +3007,28 @@ static bool _untrap_target(const coord_def move, bool check_confused)
_close_door(move); // for convenience
return (true);
default:
- mpr("You swing at nothing.");
+ {
+ bool do_msg = true;
+
+ // Press trigger/switch/button in wall.
+ if (grid_is_solid(feat))
+ {
+ dgn_event event(DET_WALL_HIT, target);
+ event.arg1 = NON_MONSTER;
+
+ // Listener can veto the event to prevent the "You swing at
+ // nothing" message.
+ do_msg =
+ dungeon_events.fire_vetoable_position_event(event,
+ target);
+ }
+ if (do_msg)
+ mpr("You swing at nothing.");
make_hungry(3, true);
you.turn_is_over = true;
return (true);
}
+ }
}
// Else it's a closed door and needs further handling.