(engine, "x");
+
+ SQGSTestMode.PostRegister(engine);
+}
diff --git a/src/script/api/script_accounting.hpp b/src/script/api/script_accounting.hpp
index f87d3749c3..7477e09fe0 100644
--- a/src/script/api/script_accounting.hpp
+++ b/src/script/api/script_accounting.hpp
@@ -17,7 +17,7 @@
/**
* Class that keeps track of the costs, so you can request how much a block of
* commands did cost in total. Works in both Execute as in Test mode.
- * @api ai
+ * @api ai game
* Example:
*
* {
diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp
index ab8bf8893c..03d8604ece 100644
--- a/src/script/api/script_controller.hpp
+++ b/src/script/api/script_controller.hpp
@@ -19,7 +19,7 @@
* The Controller, the class each Script should extend. It creates the Script,
* makes sure the logic kicks in correctly, and that GetTick() has a valid
* value.
- * @api ai
+ * @api ai game
*/
class ScriptController {
friend class AIScanner;
diff --git a/src/script/api/script_error.hpp b/src/script/api/script_error.hpp
index 53c084fadf..6e167bd2d2 100644
--- a/src/script/api/script_error.hpp
+++ b/src/script/api/script_error.hpp
@@ -40,7 +40,7 @@
/**
* Class that handles all error related functions.
- * @api ai
+ * @api ai game
*/
class ScriptError : public ScriptObject {
public:
diff --git a/src/script/api/script_event.hpp b/src/script/api/script_event.hpp
index bfb49be786..ba8131edab 100644
--- a/src/script/api/script_event.hpp
+++ b/src/script/api/script_event.hpp
@@ -18,7 +18,7 @@
* Class that handles all event related functions.
* You can lookup the type, and than convert it to the real event-class.
* That way you can request more detailed information about the event.
- * @api ai
+ * @api ai game
*/
class ScriptEvent : public ScriptObject {
public:
@@ -74,7 +74,7 @@ protected:
/**
* Class that handles all event related functions.
- * @api ai
+ * @api ai game
* @note it is not needed to create an instance of ScriptEvent to access it, as
* all members are static, and all data is stored AI-wide.
*/
diff --git a/src/script/api/script_execmode.hpp b/src/script/api/script_execmode.hpp
index 5fe5853afb..2c64a7a01d 100644
--- a/src/script/api/script_execmode.hpp
+++ b/src/script/api/script_execmode.hpp
@@ -20,7 +20,7 @@
* Execute. The original mode is stored and recovered from when ever the
* instance is destroyed.
* In Execute mode all commands you do are executed for real.
- * @api ai
+ * @api ai game
*/
class ScriptExecMode : public ScriptObject {
private:
diff --git a/src/script/api/script_info_docs.hpp b/src/script/api/script_info_docs.hpp
index 28f2b53f0b..10d2f09f7c 100644
--- a/src/script/api/script_info_docs.hpp
+++ b/src/script/api/script_info_docs.hpp
@@ -22,7 +22,7 @@
* the information here can be used for libraries, but the information
* will not be shown in the GUI except for error/debug messages.
*
- * @api ai
+ * @api ai game
*/
class ScriptInfo {
public:
@@ -151,13 +151,12 @@ public:
* and not the bugfix number as valid return for this function.
*
* Valid return values are:
- * - "0.7"
- * - "1.0"
- * - "1.1"
- * - "1.2"
+ * - "0.7" (for AI only)
+ * - "1.0" (for AI only)
+ * - "1.1" (for AI only)
+ * - "1.2" (for both AI and GS)
*
* @return The version this Script is compatible with.
- * @note This function is optional.
*/
string GetAPIVersion();
diff --git a/src/script/api/script_list.hpp b/src/script/api/script_list.hpp
index 42655e950a..4e3d357d22 100644
--- a/src/script/api/script_list.hpp
+++ b/src/script/api/script_list.hpp
@@ -21,7 +21,7 @@ class ScriptListSorter;
/**
* Class that creates a list which can keep item/value pairs, which you can walk.
- * @api ai
+ * @api ai game
*/
class ScriptList : public ScriptObject {
public:
diff --git a/src/script/api/script_log.hpp b/src/script/api/script_log.hpp
index a3a1cd9bff..5893106943 100644
--- a/src/script/api/script_log.hpp
+++ b/src/script/api/script_log.hpp
@@ -16,7 +16,7 @@
/**
* Class that handles all log related functions.
- * @api ai
+ * @api ai game
*/
class ScriptLog : public ScriptObject {
/* ScriptController needs access to Enum and Log, in order to keep the flow from
diff --git a/src/script/api/script_testmode.hpp b/src/script/api/script_testmode.hpp
index a447ed8146..161e490a33 100644
--- a/src/script/api/script_testmode.hpp
+++ b/src/script/api/script_testmode.hpp
@@ -22,7 +22,7 @@
* In Test mode all the commands you execute aren't really executed. The
* system only checks if it would be able to execute your requests, and what
* the cost would be.
- * @api ai
+ * @api ai game
*/
class ScriptTestMode : public ScriptObject {
private:
diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk
index 8e4bc35462..b0b1695762 100644
--- a/src/script/api/squirrel_export.awk
+++ b/src/script/api/squirrel_export.awk
@@ -95,11 +95,13 @@ BEGIN {
has_fileheader = "false"
cls_level = 0
RS = "\r|\n"
+ apis = tolower(api)
+ if (apis == "gs") apis = "game"
}
/@file/ {
filename = $3
- gsub("^" tolower(api) "_", "script_", filename)
+ gsub("^" apis "_", "script_", filename)
}
# Ignore special doxygen blocks
@@ -133,9 +135,9 @@ BEGIN {
api_selected = "false"
} else if ($0 == "-all") {
api_selected = "false"
- } else if (match($0, "-" tolower(api))) {
+ } else if (match($0, "-" apis)) {
api_selected = "false"
- } else if (match($0, tolower(api))) {
+ } else if (match($0, apis)) {
api_selected = "true"
}
diff --git a/src/script/api/squirrel_export.sh b/src/script/api/squirrel_export.sh
index c1182ce8f0..fb8e5bb8b5 100755
--- a/src/script/api/squirrel_export.sh
+++ b/src/script/api/squirrel_export.sh
@@ -39,6 +39,7 @@ fi
case $apilc in
template) apiuc="Template" ;;
ai) apiuc="AI" ;;
+ game) apiuc="GS" ;;
*) echo "Unknown API type."; exit 1 ;;
esac
diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp
index dbccd3c08a..4e31d3247e 100644
--- a/src/script/squirrel.hpp
+++ b/src/script/squirrel.hpp
@@ -16,7 +16,8 @@
/** The type of script we're working with, i.e. for who is it? */
enum ScriptType {
- ST_AI, ///< The script is for the AI.
+ ST_AI, ///< The script is for AI scripts.
+ ST_GS, ///< The script is for Game scripts.
};
class Squirrel {