diff options
author | zuu <zuu@openttd.org> | 2013-06-09 12:57:22 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-06-09 12:57:22 +0000 |
commit | 33ad9774fb7c51f1ec706851c7a96a7ced5ff622 (patch) | |
tree | af64b06f63d6168eef04bf09172732f6af896027 /src/script/api/script_story_page.cpp | |
parent | a49a4eec6e9b9fd7a9520af882a38697dd3a0ed3 (diff) | |
download | openttd-33ad9774fb7c51f1ec706851c7a96a7ced5ff622.tar.xz |
(svn r25352) -Feature: GameScript API for selecting a story page to view
Diffstat (limited to 'src/script/api/script_story_page.cpp')
-rw-r--r-- | src/script/api/script_story_page.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/api/script_story_page.cpp b/src/script/api/script_story_page.cpp index e94bc0017..8d6253b3c 100644 --- a/src/script/api/script_story_page.cpp +++ b/src/script/api/script_story_page.cpp @@ -109,6 +109,14 @@ return ScriptObject::DoCommand(0, story_page_id, 0, CMD_SET_STORY_PAGE_TITLE, title != NULL? title->GetEncodedText() : NULL); } +/* static */ bool ScriptStoryPage::Show(StoryPageID story_page_id) +{ + EnforcePrecondition(false, IsValidStoryPage(story_page_id)); + EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); + + return ScriptObject::DoCommand(0, story_page_id, 0, CMD_SHOW_STORY_PAGE); +} + /* static */ bool ScriptStoryPage::Remove(StoryPageID story_page_id) { EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); |