summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/chardump.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-24 20:52:31 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-24 20:52:31 +0000
commit989c9485083c303472aa7eadc84dd578993f8a9c (patch)
tree36b890167490e2376a9b610ec568d5f418db5b8f /crawl-ref/source/chardump.cc
parentb3f9dc0237ef7b87dffd6867b4ffeace74e28851 (diff)
downloadcrawl-ref-989c9485083c303472aa7eadc84dd578993f8a9c.tar.gz
crawl-ref-989c9485083c303472aa7eadc84dd578993f8a9c.zip
Move the mpr version of the monster list to output.cc and add it to
the dumped information in the morgue. Change monster naming to the precise listing of zombie sub types etc. but list monster types in brackets for non-unique named monsters, so you can now find information like the following in your morgue file: "You can see a goblin, an orc, two orc warriors, thirteen friendly orcs, and the friendly Bogrim (orc priest)." Since the concise version of the monster list is still an in-game command ('F'), this also neatly solves the problem of orc players not knowing the type of their followers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5223 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r--crawl-ref/source/chardump.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 9199e35024..d83264c6ed 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -88,6 +88,7 @@ static void sdump_kills(dump_params &);
static void sdump_newline(dump_params &);
static void sdump_overview(dump_params &);
static void sdump_hiscore(dump_params &);
+static void sdump_monster_list(dump_params &);
static void sdump_separator(dump_params &);
#ifdef CLUA_BINDINGS
static void sdump_lua(dump_params &);
@@ -139,6 +140,7 @@ static dump_section_handler dump_handlers[] = {
{ "kills", sdump_kills },
{ "overview", sdump_overview },
{ "hiscore", sdump_hiscore },
+ { "monlist", sdump_monster_list },
// Conveniences for the .crawlrc artist.
{ "", sdump_newline },
@@ -1064,9 +1066,7 @@ static void sdump_kills_by_place(dump_params &par)
}
if (result.length() > 0)
- {
text += header + result + footer + "\n";
- }
}
static void sdump_overview(dump_params &par)
@@ -1089,6 +1089,14 @@ static void sdump_hiscore(dump_params &par)
par.text += "\n\n";
}
+static void sdump_monster_list(dump_params &par)
+{
+ std::string monlist = mpr_monster_list(par.se);
+ trim_string(monlist);
+ par.text += monlist;
+ par.text += "\n\n";
+}
+
static void sdump_mutations(dump_params &par)
{
std::string &text(par.text);