summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-04-23 10:25:29 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-04-23 10:26:32 -0400
commit55ab616a8764c7c7b3cea8aa8461c82f73aa44aa (patch)
treea5bb24a17fd7e1fdc4bfce44c2671af44e727616
parent32ba97dc61202426f563582238aedd7b668ca8c1 (diff)
downloadcrawl-ref-55ab616a8764c7c7b3cea8aa8461c82f73aa44aa.tar.gz
crawl-ref-55ab616a8764c7c7b3cea8aa8461c82f73aa44aa.zip
Don't log DGL messages twice in certain instances (#8414).
This was accomplished by adding a new message channel, MSGCH_DGL_MESSAGE.
-rw-r--r--crawl-ref/source/dgl-message.cc8
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/message.cc3
-rw-r--r--crawl-ref/source/mpr.h1
4 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/dgl-message.cc b/crawl-ref/source/dgl-message.cc
index 0f4e93432f..a31b5b843f 100644
--- a/crawl-ref/source/dgl-message.cc
+++ b/crawl-ref/source/dgl-message.cc
@@ -34,10 +34,10 @@ static void _show_message_line(string line)
fs.cprintf("%s: ", sender.c_str());
fs.textcolor(LIGHTGREY);
fs.cprintf("%s", line.c_str());
- formatted_mpr(fs, MSGCH_PLAIN, 0);
+ formatted_mpr(fs, MSGCH_DGL_MESSAGE, 0);
if (Options.note_dgl_messages)
{
- take_note(Note(NOTE_MESSAGE, MSGCH_PLAIN, 0,
+ take_note(Note(NOTE_MESSAGE, MSGCH_DGL_MESSAGE, 0,
(sender + ": " + line).c_str()));
}
}
@@ -86,7 +86,7 @@ static void _read_each_message()
if (say_got_msg)
{
- mprf(MSGCH_PROMPT, "Your messages:");
+ mprf(MSGCH_DGL_MESSAGE, "Your messages:");
say_got_msg = false;
}
@@ -125,7 +125,7 @@ void read_messages()
static void _announce_messages()
{
// XXX: We could do a NetHack-like mail daemon here at some point.
- mpr("Beep! Your pager goes off! Use _ to check your messages.");
+ mpr("Beep! Your pager goes off! Use _ to check your messages.", MSGCH_DGL_MESSAGE);
}
void check_messages()
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 5f566ce374..d4c2cab7a7 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -165,7 +165,7 @@ static const string message_channel_names[] =
"friend_spell", "friend_enchant", "monster_damage", "monster_target",
"banishment", "rotten_meat", "equipment", "floor", "multiturn", "examine",
"examine_filter", "diagnostic", "error", "tutorial", "orb", "timed_portal",
- "hell_effect", "monster_warning",
+ "hell_effect", "monster_warning", "dgl_message",
};
// returns -1 if unmatched else returns 0--(NUM_MESSAGE_CHANNELS-1)
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 4ac800af43..870d6996e8 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -936,6 +936,7 @@ static msg_colour_type channel_to_msgcol(msg_channel_type channel, int param)
case MSGCH_EQUIPMENT:
case MSGCH_EXAMINE:
case MSGCH_EXAMINE_FILTER:
+ case MSGCH_DGL_MESSAGE:
default:
ret = param > 0 ? msg_colour(param) : MSGCOL_LIGHTGREY;
break;
@@ -1370,7 +1371,7 @@ static void mpr_check_patterns(const string& message,
if (channel == MSGCH_EQUIPMENT || channel == MSGCH_FLOOR_ITEMS
|| channel == MSGCH_MULTITURN_ACTION
|| channel == MSGCH_EXAMINE || channel == MSGCH_EXAMINE_FILTER
- || channel == MSGCH_TUTORIAL)
+ || channel == MSGCH_TUTORIAL || channel == MSGCH_DGL_MESSAGE)
{
continue;
}
diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h
index 697ae05e39..ade9493803 100644
--- a/crawl-ref/source/mpr.h
+++ b/crawl-ref/source/mpr.h
@@ -46,6 +46,7 @@ enum msg_channel_type
MSGCH_TIMED_PORTAL, // timed portal entry "tick tick tick" sounds
MSGCH_HELL_EFFECT, // hell effects
MSGCH_MONSTER_WARNING, // "Foo comes into view", et al
+ MSGCH_DGL_MESSAGE, // dgamelaunch messages
NUM_MESSAGE_CHANNELS // always last
};