summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/kills.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-06-21 11:50:54 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-06-21 11:56:17 +0200
commit741146cc2c72feac18a943fcab40f6edb0284a67 (patch)
treef732e54ed41068f746f7a2a2e8f9254e463da963 /crawl-ref/source/kills.cc
parentc5a66a46ca0693f3b2ad6e47866b03d772cf34fd (diff)
downloadcrawl-ref-741146cc2c72feac18a943fcab40f6edb0284a67.tar.gz
crawl-ref-741146cc2c72feac18a943fcab40f6edb0284a67.zip
Hardcode loading of kills.lua; it's now dump_kill_breakdowns (default off).
For the time being, a stub exists in the old path, including that will flip the switch to on.
Diffstat (limited to 'crawl-ref/source/kills.cc')
-rw-r--r--crawl-ref/source/kills.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/kills.cc b/crawl-ref/source/kills.cc
index 1e7e75c2cf..499b0a7c79 100644
--- a/crawl-ref/source/kills.cc
+++ b/crawl-ref/source/kills.cc
@@ -168,9 +168,11 @@ std::string KillMaster::kill_info() const
}
#ifdef CLUA_BINDINGS
+ bool custom = false;
unwind_var<int> lthrottle(clua.throttle_unit_lines, 500000);
// Call the kill dump Lua function with null a, to tell it we're done.
- if (!clua.callfn("c_kill_list", "ss", NULL, grandt.c_str()))
+ if (!clua.callfn("c_kill_list", "ss>b", NULL, grandt.c_str(), &custom)
+ || !custom)
#endif
{
// We can sum up ourselves, if Lua doesn't want to.
@@ -208,7 +210,8 @@ void KillMaster::add_kill_info(std::string &killtext,
lua_pushboolean(clua, separator);
unwind_var<int> lthrottle(clua.throttle_unit_lines, 500000);
- if (!clua.callfn("c_kill_list", 3, 0))
+ if (!clua.callfn("c_kill_list", 3, 1)
+ || !lua_isboolean(clua, -1) || !lua_toboolean(clua, -1))
#endif
{
#ifdef CLUA_BINDINGS