summaryrefslogtreecommitdiff
path: root/src/script/script_instance.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-29 23:27:01 +0000
committertruebrain <truebrain@openttd.org>2011-11-29 23:27:01 +0000
commit880f377fa61d8c87dc409f25447515509348bb45 (patch)
tree25d8e5f4bb15d3867b87452d578a605ff957ba06 /src/script/script_instance.hpp
parent3e6d0261291a1c91bf4f57c06fd9d180c175befc (diff)
downloadopenttd-880f377fa61d8c87dc409f25447515509348bb45.tar.xz
(svn r23367) -Codechange: refactor GetSetting to ScriptInstance, to avoid global variable in script_controller
Diffstat (limited to 'src/script/script_instance.hpp')
-rw-r--r--src/script/script_instance.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp
index b84a36496..122cc5808 100644
--- a/src/script/script_instance.hpp
+++ b/src/script/script_instance.hpp
@@ -37,6 +37,13 @@ public:
void Initialize(const char *main_script, const char *instance_name);
/**
+ * Get the value of a setting of the current instance.
+ * @param name The name of the setting.
+ * @return the value for the setting, or -1 if the setting is not known.
+ */
+ virtual int GetSetting(const char *name) = 0;
+
+ /**
* A script in multiplayer waits for the server to handle his DoCommand.
* It keeps waiting for this until this function is called.
*/