From dbd39af58a1eea630b6e390375517acb79b179f2 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 16 May 2012 17:06:08 +0400 Subject: Support testing and modifying pending timeout callbacks. --- Lua API.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index ed2e9f6a..d44d82ba 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1265,6 +1265,12 @@ and cannot be queued until it is loaded again. Returns the timer id, or nil if unsuccessful due to world being unloaded.
+dfhack.timeout_active(id[,new_callback])
+Returns the active callback with the given id, or nil +if inactive or nil id. If called with 2 arguments, replaces +the current callback with the given value, if still active. +Using timeout_active(id,nil) cancels the timer.
+dfhack.onStateChange.foo = function(code)
Event. Receives the same codes as plugin_onstatechange in C++.