summaryrefslogtreecommitdiff
path: root/src/script/api/script_object.cpp
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2013-06-09 12:19:09 +0000
committerzuu <zuu@openttd.org>2013-06-09 12:19:09 +0000
commit9aa1bf026443ddc65ab4381e86c294943ddc30d8 (patch)
tree82af61f4b6f346bd71046a5d6fa6bab1f49b3d34 /src/script/api/script_object.cpp
parentbea60988c67b40fb5b3058990779a4d572511224 (diff)
downloadopenttd-9aa1bf026443ddc65ab4381e86c294943ddc30d8.tar.xz
(svn r25342) -Add: StoryPage data structures and GS API
Diffstat (limited to 'src/script/api/script_object.cpp')
-rw-r--r--src/script/api/script_object.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp
index 2852c4ae9..6615b58de 100644
--- a/src/script/api/script_object.cpp
+++ b/src/script/api/script_object.cpp
@@ -144,6 +144,8 @@ ScriptObject::ActiveInstance::~ActiveInstance()
SetNewSignID(_new_sign_id);
SetNewGroupID(_new_group_id);
SetNewGoalID(_new_goal_id);
+ SetNewStoryPageID(_new_story_page_id);
+ SetNewStoryPageElementID(_new_story_page_element_id);
}
/* static */ bool ScriptObject::GetLastCommandRes()
@@ -191,6 +193,26 @@ ScriptObject::ActiveInstance::~ActiveInstance()
return GetStorage()->new_goal_id;
}
+/* static */ void ScriptObject::SetNewStoryPageID(StoryPageID story_page_id)
+{
+ GetStorage()->new_story_page_id = story_page_id;
+}
+
+/* static */ GroupID ScriptObject::GetNewStoryPageID()
+{
+ return GetStorage()->new_story_page_id;
+}
+
+/* static */ void ScriptObject::SetNewStoryPageElementID(StoryPageElementID story_page_element_id)
+{
+ GetStorage()->new_story_page_element_id = story_page_element_id;
+}
+
+/* static */ GroupID ScriptObject::GetNewStoryPageElementID()
+{
+ return GetStorage()->new_story_page_element_id;
+}
+
/* static */ void ScriptObject::SetAllowDoCommand(bool allow)
{
GetStorage()->allow_do_command = allow;