summaryrefslogtreecommitdiff
path: root/src/script/api/script_object.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-01-08 21:48:05 +0000
committerrubidium <rubidium@openttd.org>2012-01-08 21:48:05 +0000
commit4479f90843d3597268f889a3955f3c5289b92e0a (patch)
tree969e79bea4a892f189791f593751fa0ff463240e /src/script/api/script_object.hpp
parentab38e3227dbbefab952530c4ddf5408605187fcb (diff)
downloadopenttd-4479f90843d3597268f889a3955f3c5289b92e0a.tar.xz
(svn r23777) -Codechange: refactor allocating memory and fetching strings into a single function for scripts
Diffstat (limited to 'src/script/api/script_object.hpp')
-rw-r--r--src/script/api/script_object.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp
index 7c9e71460..4a39e618e 100644
--- a/src/script/api/script_object.hpp
+++ b/src/script/api/script_object.hpp
@@ -236,6 +236,11 @@ protected:
*/
static void *&GetLogPointer();
+ /**
+ * Get an allocated string with all control codes stripped off.
+ */
+ static char *GetString(StringID string);
+
private:
/**
* Store a new_vehicle_id per company.