diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-04 09:34:40 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-04 09:34:40 +0000 |
commit | b2226ab9c80895a591f3dbade4c61d72c4bab642 (patch) | |
tree | fe98f14edf5fd5460bed621a79fb9d4f91a5e968 | |
parent | 99affe81903ecec2f5eaf98584eb67b93ecdfad6 (diff) | |
download | crawl-ref-b2226ab9c80895a591f3dbade4c61d72c4bab642.tar.gz crawl-ref-b2226ab9c80895a591f3dbade4c61d72c4bab642.zip |
Suppress --More-- when travel/explore makes a T&D trap save.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4864 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/externs.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 14 |
3 files changed, 17 insertions, 3 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index dbe192d304..d0d3349e4e 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -473,8 +473,8 @@ public: // Returns true if we're currently resting. bool is_rest() const; - bool is_explore() const; + bool is_any_travel() const; // Clears run state. void clear(); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 108462a7e1..6101429dc0 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -160,8 +160,8 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, mprf( MSGCH_WARN, "Wait a moment, %s! Do you really want to step there?", you.your_name ); - - more(); + if (!you.running.is_any_travel()) + more(); exercise( SK_TRAPS_DOORS, 3 ); diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 2822672f93..ddd295e162 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -3882,6 +3882,20 @@ bool runrest::is_explore() const return (runmode == RMODE_EXPLORE || runmode == RMODE_EXPLORE_GREEDY); } +bool runrest::is_any_travel() const +{ + switch (runmode) + { + case RMODE_INTERLEVEL: + case RMODE_EXPLORE_GREEDY: + case RMODE_EXPLORE: + case RMODE_TRAVEL: + return (true); + default: + return (false); + } +} + void runrest::rest() { // stop_running() Lua hooks will never see rest stops. |