diff options
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 76ef608f55..72dcc74086 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 ]) @@ -456,6 +459,8 @@ void mpr_comma_separated_list(const std::string prefix, new_str += comma; else if (i == (size - 2)) new_str += andc; + else if (i == (size - 1)) + new_str += "."; if (out.length() + new_str.length() >= width) { @@ -484,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) @@ -493,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) { @@ -563,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 ); @@ -729,6 +737,13 @@ void more(void) return; } #endif + + if (crawl_state.is_replaying_keys()) + { + mesclr(); + return; + } + if (Options.show_more_prompt && !suppress_messages) { char keypress = 0; |