summaryrefslogtreecommitdiff
path: root/library/Core.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-04 20:59:06 +0400
committerAlexander Gavrilov2012-05-04 20:59:06 +0400
commit7e01b004e9675fec417bee0eead7d3d0702395e6 (patch)
tree5d37f646154b15659e2db4cb5f3a515080aabc87 /library/Core.cpp
parentd4d6349f48d01b31f59f94238d6656e3b5d08508 (diff)
downloaddfhack-7e01b004e9675fec417bee0eead7d3d0702395e6.tar.gz
dfhack-7e01b004e9675fec417bee0eead7d3d0702395e6.tar.bz2
dfhack-7e01b004e9675fec417bee0eead7d3d0702395e6.tar.xz
Implement timeouts in the core lua context, and quicksave script.
Diffstat (limited to 'library/Core.cpp')
-rw-r--r--library/Core.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/Core.cpp b/library/Core.cpp
index 60e38059..d7e4435c 100644
--- a/library/Core.cpp
+++ b/library/Core.cpp
@@ -355,6 +355,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve
{
string help = getLuaHelp(filename);
con.print("%s: %s\n", parts[0].c_str(), help.c_str());
+ return CR_OK;
}
con.printerr("Unknown command: %s\n", parts[0].c_str());
}
@@ -1077,6 +1078,9 @@ int Core::Update()
// notify all the plugins that a game tick is finished
plug_mgr->OnUpdate(out);
+ // process timers in lua
+ Lua::Core::onUpdate(out);
+
// Release the fake suspend lock
{
lock_guard<mutex> lock(d->AccessMutex);