summaryrefslogtreecommitdiff
path: root/library/LuaApi.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/LuaApi.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/LuaApi.cpp')
-rw-r--r--library/LuaApi.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp
index 828e54cb..ea723df6 100644
--- a/library/LuaApi.cpp
+++ b/library/LuaApi.cpp
@@ -570,9 +570,14 @@ static void OpenModule(lua_State *state, const char *mname,
#define WRAP(function) { #function, df::wrap_function(function,true) }
#define WRAPN(name, function) { #name, df::wrap_function(function,true) }
-/***** Translation module *****/
+/***** DFHack module *****/
+
+static bool isWorldLoaded() { return Core::getInstance().isWorldLoaded(); }
+static bool isMapLoaded() { return Core::getInstance().isMapLoaded(); }
static const LuaWrapper::FunctionReg dfhack_module[] = {
+ WRAP(isWorldLoaded),
+ WRAP(isMapLoaded),
WRAPM(Translation, TranslateName),
{ NULL, NULL }
};