summaryrefslogtreecommitdiff
path: root/src/script/api/script_object.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
commitcc3f42794d134b9f4b6c7efecb07d4b3366887c1 (patch)
tree1cd422d47fc44bd59463d0f9e2ef96f2edb09b50 /src/script/api/script_object.hpp
parent403cd3acdb7b7fedf2b5e823326611bb32113385 (diff)
downloadopenttd-cc3f42794d134b9f4b6c7efecb07d4b3366887c1.tar.xz
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
Diffstat (limited to 'src/script/api/script_object.hpp')
-rw-r--r--src/script/api/script_object.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp
index 86bdbf8df..7c9e71460 100644
--- a/src/script/api/script_object.hpp
+++ b/src/script/api/script_object.hpp
@@ -181,6 +181,27 @@ protected:
static bool GetAllowDoCommand();
/**
+ * Set the current company to execute commands for or request
+ * information about.
+ * @param company The new company.
+ */
+ static void SetCompany(CompanyID company);
+
+ /**
+ * Get the current company we are executing commands for or
+ * requesting information about.
+ * @return The current company.
+ */
+ static CompanyID GetCompany();
+
+ /**
+ * Get the root company, the company that the script really
+ * runs under / for.
+ * @return The root company.
+ */
+ static CompanyID GetRootCompany();
+
+ /**
* Set the cost of the last command.
*/
static void SetLastCost(Money last_cost);