diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-25 15:33:36 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-25 15:33:36 +0000 |
commit | 0afe4c455bf5a0358cf7f6688b413389a5080fcc (patch) | |
tree | 9580836186a5f1612b2a98279255ee7af45c1063 /crawl-ref/source/dgnevent.h | |
parent | ad382c58bd22273fdcb13759bf35e1c89d573e97 (diff) | |
download | crawl-ref-0afe4c455bf5a0358cf7f6688b413389a5080fcc.tar.gz crawl-ref-0afe4c455bf5a0358cf7f6688b413389a5080fcc.zip |
Ziggurat portals charge gold for entry.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7610 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dgnevent.h')
-rw-r--r-- | crawl-ref/source/dgnevent.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/dgnevent.h b/crawl-ref/source/dgnevent.h index fdafe892aa..75a0174c06 100644 --- a/crawl-ref/source/dgnevent.h +++ b/crawl-ref/source/dgnevent.h @@ -29,7 +29,10 @@ enum dgn_event_type DET_MONSTER_DIED = 0x0100, DET_ITEM_PICKUP = 0x0200, DET_ITEM_MOVED = 0x0400, - DET_FEAT_CHANGE = 0x0800 + DET_FEAT_CHANGE = 0x0800, + + // Vetoable events, usually fired before the corresponding (real) event. + DETV_LEAVE_LEVEL = 0x1000 }; class dgn_event @@ -55,7 +58,8 @@ class dgn_event_listener { public: virtual ~dgn_event_listener(); - virtual void notify_dgn_event(const dgn_event &e) = 0; + // For vetoable events, return false to veto. + virtual bool notify_dgn_event(const dgn_event &e) = 0; }; // Alarm goes off when something enters this square. @@ -97,6 +101,13 @@ public: bool has_listeners_at(const coord_def &pos) const; void move_listeners(const coord_def &from, const coord_def &to); + // Returns false if the event is vetoed. + bool fire_vetoable_position_event(const dgn_event &e, + const coord_def &pos); + + bool fire_vetoable_position_event(dgn_event_type et, + const coord_def &pos); + void fire_position_event(dgn_event_type et, const coord_def &pos); void fire_position_event(const dgn_event &e, const coord_def &pos); void fire_event(dgn_event_type et); |