summaryrefslogtreecommitdiff
path: root/src/script/script_instance.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/script_instance.hpp')
-rw-r--r--src/script/script_instance.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp
index 8aa85744c..e7a23ccd9 100644
--- a/src/script/script_instance.hpp
+++ b/src/script/script_instance.hpp
@@ -159,6 +159,12 @@ public:
*/
void InsertEvent(class ScriptEvent *event);
+ /**
+ * Check if the instance is sleeping, which either happened because the
+ * script executed a DoCommand, or executed this.Sleep().
+ */
+ bool IsSleeping() { return this->suspend != 0; }
+
protected:
class Squirrel *engine; ///< A wrapper around the squirrel vm.