summaryrefslogtreecommitdiff
path: root/src/script/api/script_controller.hpp
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2012-09-21 20:49:43 +0000
committerzuu <zuu@openttd.org>2012-09-21 20:49:43 +0000
commit46605e554ecdb9424e4b7529fefb65420747d2a0 (patch)
tree47ae4fa485f5ef7a4bc96daf49ba6715e08267a8 /src/script/api/script_controller.hpp
parentb490d5ceab37afead2e22fbbef71b9ed71d9adc7 (diff)
downloadopenttd-46605e554ecdb9424e4b7529fefb65420747d2a0.tar.xz
(svn r24542) -Feature: Allow AI/GS script developers to break the execution of their scripts using ScriptController::Break
Diffstat (limited to 'src/script/api/script_controller.hpp')
-rw-r--r--src/script/api/script_controller.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp
index 981ad50bb..9ee329124 100644
--- a/src/script/api/script_controller.hpp
+++ b/src/script/api/script_controller.hpp
@@ -105,6 +105,18 @@ public:
static void Sleep(int ticks);
/**
+ * Break execution of the script when script developer tools are active. For
+ * other users, nothing will happen when you call this function. To resume
+ * the script, you have to click on the continue button in the AI debug
+ * window. It is not recommended to leave calls to this function in scripts
+ * that you publish or upload to bananas.
+ * @param message to print in the AI debug window when the break occurs.
+ * @note gui.ai_developer_tools setting must be enabled or the break is
+ * ignored.
+ */
+ static bool Break(const char* message);
+
+ /**
* When Squirrel triggers a print, this function is called.
* Squirrel calls this when 'print' is used, or when the script made an error.
* @param error_msg If true, it is a Squirrel error message.