summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-speak.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-21 14:40:14 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-22 01:49:52 +0200
commit2a8b170176470bc1837b1c621ed3edcec302959b (patch)
tree867315ed38d02e00c82c9bb7a7fe5f44ba91a07d /crawl-ref/source/mon-speak.cc
parenta33006255978e3b57840cdc7c5e68fee73748e50 (diff)
downloadcrawl-ref-2a8b170176470bc1837b1c621ed3edcec302959b.tar.gz
crawl-ref-2a8b170176470bc1837b1c621ed3edcec302959b.zip
Remove unused monster props: speech_func and shout_func.
They don't do anything lua embedded in the db can't already do.
Diffstat (limited to 'crawl-ref/source/mon-speak.cc')
-rw-r--r--crawl-ref/source/mon-speak.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/crawl-ref/source/mon-speak.cc b/crawl-ref/source/mon-speak.cc
index dbcd0fbd57..7751658c3b 100644
--- a/crawl-ref/source/mon-speak.cc
+++ b/crawl-ref/source/mon-speak.cc
@@ -585,42 +585,6 @@ bool mons_speaks(monster* mons)
}
else
{
- if (mons->props.exists("speech_func"))
- {
-#ifdef DEBUG_MONSPEAK
- mpr("Trying Lua function for monster speech", MSGCH_DIAGNOSTICS);
-#endif
- lua_stack_cleaner clean(dlua);
-
- dlua_chunk &chunk = mons->props["speech_func"];
-
- if (!chunk.load(dlua))
- {
- push_monster(dlua, mons);
- dlua.callfn(NULL, 1, 1);
- dlua.fnreturns(">s", &msg);
-
- // __NONE means to be silent, and __NEXT means to try the next
- // method of getting a speech message.
- if (msg == "__NONE")
- {
-#ifdef DEBUG_MONSPEAK
- mpr("result: \"__NONE\"!", MSGCH_DIAGNOSTICS);
-#endif
- return (false);
- }
- if (msg == "__NEXT")
- msg.clear();
- }
- else
- {
- mprf(MSGCH_ERROR,
- "Lua speech function for monster '%s' didn't load: %s",
- mons->full_name(DESC_PLAIN).c_str(),
- dlua.error.c_str());
- }
- }
-
if (msg.empty() && mons->props.exists("speech_key"))
{
msg = _get_speak_string(prefixes,