summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-speak.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-21 15:16:57 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-22 01:49:53 +0200
commit4415be98bf5efe2738c82ff3f908250fecedc17e (patch)
tree0144b6c103b5d20ef2b501bb9f52ec0172f85bf4 /crawl-ref/source/mon-speak.cc
parent2a8b170176470bc1837b1c621ed3edcec302959b (diff)
downloadcrawl-ref-4415be98bf5efe2738c82ff3f908250fecedc17e.tar.gz
crawl-ref-4415be98bf5efe2738c82ff3f908250fecedc17e.zip
A new monster tag "dbname:", overrides the key for db lookups.
This allows sharing the same desc and speech between different monsters.
Diffstat (limited to 'crawl-ref/source/mon-speak.cc')
-rw-r--r--crawl-ref/source/mon-speak.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc
index 7751658c3b..1f75313d6e 100644
--- a/crawl-ref/source/mon-speak.cc
+++ b/crawl-ref/source/mon-speak.cc
@@ -585,10 +585,10 @@ bool mons_speaks(monster* mons)
}
else
{
- if (msg.empty() && mons->props.exists("speech_key"))
+ if (msg.empty() && mons->props.exists("dbname"))
{
msg = _get_speak_string(prefixes,
- mons->props["speech_key"].get_string(),
+ mons->props["dbname"].get_string(),
mons, no_player, no_foe, no_foe_name,
no_god, unseen);
@@ -599,7 +599,7 @@ bool mons_speaks(monster* mons)
// the key with prefixes.
std::vector<std::string> faux_prefixes;
msg = _get_speak_string(faux_prefixes,
- mons->props["speech_key"].get_string(),
+ mons->props["dbname"].get_string(),
mons, no_player, no_foe, no_foe_name,
no_god, unseen);
}