summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-15 16:00:24 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-15 16:00:24 +1000
commit5bba7e89fd395a2cde9cbf596208785508e22331 (patch)
treea27cb5ca7f89fefe7ce2ac41d3f9b00c25b3cb8d /crawl-ref/source/describe.cc
parent098c6bcea1a8eb775124fd705e8ceab8df45b051 (diff)
downloadcrawl-ref-5bba7e89fd395a2cde9cbf596208785508e22331.tar.gz
crawl-ref-5bba7e89fd395a2cde9cbf596208785508e22331.zip
Allow MonPropsMarker to set monster descriptions and quotes.
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index b7855e66aa..2dfb3218d3 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2766,10 +2766,20 @@ void get_monster_db_desc(const monsters& mons, describe_info &inf,
inf.title = "A mimic";
}
+ // This is somewhat hackish, but it's a good way of over-riding monsters'
+ // descriptions in Lua vaults by using MonPropsMarker. This is also the
+ // method used by set_feature_desc_long, etc. {due}
+ if (mons.props.exists("description"))
+ inf.body << std::string(mons.props["description"]);
// Don't get description for player ghosts.
- if (mons.type != MONS_PLAYER_GHOST)
+ else if (mons.type != MONS_PLAYER_GHOST)
inf.body << getLongDescription(db_name);
- inf.quote = getQuoteString(db_name);
+
+ // And quotes {due}
+ if (mons.props.exists("quote"))
+ inf.body << std::string(mons.props["quote"]);
+ else
+ inf.quote = getQuoteString(db_name);
std::string symbol;
symbol += get_monster_data(mons.type)->showchar;