From 7e01b004e9675fec417bee0eead7d3d0702395e6 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 4 May 2012 20:59:06 +0400 Subject: Implement timeouts in the core lua context, and quicksave script. --- Lua API.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 40706d14..b96d1215 100644 --- a/Lua API.html +++ b/Lua API.html @@ -855,6 +855,12 @@ One notable difference is that these explicit wrappers allow argument count adjustment according to the usual lua rules, so trailing false/nil arguments can be omitted.
dfhack.isWorldLoaded()
+Checks if the world is loaded.
+dfhack.isMapLoaded()
+Checks if the world and map are loaded.
+dfhack.TranslateName(name[,in_english,only_last_name])
Convert a language_name or only the last name part to string.
dfhack.is_core_context
Boolean value; true in the core context.
dfhack.timeout(time,mode,callback)
+Arranges for the callback to be called once the specified +period of time passes. The mode argument specifies the +unit of time used, and may be one of 'frames' (raw FPS), +'ticks' (unpaused FPS), 'days', 'months', +'years' (in-game time). All timers other than +'frames' are cancelled when the world is unloaded, +and cannot be queued until it is loaded again. +Returns the timer id, or nil if unsuccessful due to +world being unloaded.
+dfhack.onStateChange.foo = function(code)
Event. Receives the same codes as plugin_onstatechange in C++.