diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-08 14:01:16 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-08 14:01:16 +0000 |
commit | c7ab36b8b51c2fa925fd5245d31e5f98cfa466e0 (patch) | |
tree | f121170da25495ab7f6deaedfeac493c4fb201e2 /crawl-ref/source/message.cc | |
parent | c0976eb78b1c1319e427b449073d532d033dee50 (diff) | |
download | crawl-ref-c7ab36b8b51c2fa925fd5245d31e5f98cfa466e0.tar.gz crawl-ref-c7ab36b8b51c2fa925fd5245d31e5f98cfa466e0.zip |
Ghosts can use ensorcelled hibernation. Breaks saves, needs some work on PC sleep and wake-up correctness.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2377 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 3c825a38c7..798b15b206 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -222,6 +222,9 @@ static char god_message_altar_colour( god_type god ) // returns a colour or MSGCOL_MUTED int channel_to_colour( msg_channel_type channel, int param ) { + if (you.asleep()) + return (DARKGREY); + char ret; switch (Options.channels[ channel ]) @@ -486,7 +489,6 @@ static void mpr_check_patterns(const std::string& message, } } - // reusing travel_stop_message here if (channel != MSGCH_DIAGNOSTICS && channel != MSGCH_EQUIPMENT && channel != MSGCH_TALK && channel != MSGCH_TALK_VISUAL && channel != MSGCH_SOUND) @@ -495,6 +497,10 @@ static void mpr_check_patterns(const std::string& message, channel_to_str(channel) + ":" + message ); } + // Any sound has a chance of waking the PC if the PC is asleep. + if (channel == MSGCH_SOUND) + you.check_awaken(5); + // Check messages for all forms of running now. if (you.running) { @@ -565,7 +571,7 @@ static int prepare_message(const std::string& imsg, msg_channel_type channel, int param) { if (suppress_messages) - return MSGCOL_MUTED; + return MSGCOL_MUTED; int colour = channel_to_colour( channel, param ); |