OpenTTD Source  14.0-beta3
story_cmd.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef STORY_CMD_H
11 #define STORY_CMD_H
12 
13 #include "command_type.h"
14 #include "company_type.h"
15 #include "story_type.h"
16 #include "vehicle_type.h"
17 
18 std::tuple<CommandCost, StoryPageID> CmdCreateStoryPage(DoCommandFlag flags, CompanyID company, const std::string &text);
19 std::tuple<CommandCost, StoryPageElementID> CmdCreateStoryPageElement(DoCommandFlag flags, TileIndex tile, StoryPageID page_id, StoryPageElementType type, uint32_t reference, const std::string &text);
20 CommandCost CmdUpdateStoryPageElement(DoCommandFlag flags, TileIndex tile, StoryPageElementID page_element_id, uint32_t reference, const std::string &text);
21 CommandCost CmdSetStoryPageTitle(DoCommandFlag flags, StoryPageID page_id, const std::string &text);
22 CommandCost CmdSetStoryPageDate(DoCommandFlag flags, StoryPageID page_id, TimerGameCalendar::Date date);
26 CommandCost CmdStoryPageButton(DoCommandFlag flags, TileIndex tile, StoryPageElementID page_element_id, VehicleID reference);
27 
37 
38 #endif /* STORY_CMD_H */
CmdStoryPageButton
CommandCost CmdStoryPageButton(DoCommandFlag flags, TileIndex tile, StoryPageElementID page_element_id, VehicleID reference)
Clicked/used a button on a story page.
Definition: story.cpp:436
CmdSetStoryPageDate
CommandCost CmdSetStoryPageDate(DoCommandFlag flags, StoryPageID page_id, TimerGameCalendar::Date date)
Update date of a story page.
Definition: story.cpp:342
CMD_CREATE_STORY_PAGE_ELEMENT
@ CMD_CREATE_STORY_PAGE_ELEMENT
create a new story page element
Definition: command_type.h:307
CmdShowStoryPage
CommandCost CmdShowStoryPage(DoCommandFlag flags, StoryPageID page_id)
Display a story page for all clients that are allowed to view the story page.
Definition: story.cpp:364
StoryPageElementType
StoryPageElementType
Definition: story_base.h:30
CMD_SHOW_STORY_PAGE
@ CMD_SHOW_STORY_PAGE
show a story page
Definition: command_type.h:311
StoryPageElementID
uint16_t StoryPageElementID
ID of a story page element.
Definition: story_type.h:15
CMD_CREATE_STORY_PAGE
@ CMD_CREATE_STORY_PAGE
create a new story page
Definition: command_type.h:306
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
CMD_STORY_PAGE_BUTTON
@ CMD_STORY_PAGE_BUTTON
selection via story page button
Definition: command_type.h:315
Owner
Owner
Enum for all companies/owners.
Definition: company_type.h:18
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition: command_type.h:369
CMD_DEITY
@ CMD_DEITY
the command may be executed by COMPANY_DEITY
Definition: command_type.h:400
story_type.h
CMD_REMOVE_STORY_PAGE_ELEMENT
@ CMD_REMOVE_STORY_PAGE_ELEMENT
remove a story page element
Definition: command_type.h:313
CommandCost
Common return value for all commands.
Definition: command_type.h:23
CMDT_OTHER_MANAGEMENT
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
Definition: command_type.h:414
CmdCreateStoryPageElement
std::tuple< CommandCost, StoryPageElementID > CmdCreateStoryPageElement(DoCommandFlag flags, TileIndex tile, StoryPageID page_id, StoryPageElementType type, uint32_t reference, const std::string &text)
Create a new story page element.
Definition: story.cpp:248
CmdRemoveStoryPageElement
CommandCost CmdRemoveStoryPageElement(DoCommandFlag flags, StoryPageElementID page_element_id)
Remove a story page element.
Definition: story.cpp:411
CMD_REMOVE_STORY_PAGE
@ CMD_REMOVE_STORY_PAGE
remove a story page
Definition: command_type.h:312
CMD_SET_STORY_PAGE_DATE
@ CMD_SET_STORY_PAGE_DATE
update date of a story page
Definition: command_type.h:310
VehicleID
uint32_t VehicleID
The type all our vehicle IDs have.
Definition: vehicle_type.h:16
command_type.h
vehicle_type.h
CMD_SET_STORY_PAGE_TITLE
@ CMD_SET_STORY_PAGE_TITLE
update title of a story page
Definition: command_type.h:309
CmdRemoveStoryPage
CommandCost CmdRemoveStoryPage(DoCommandFlag flags, StoryPageID page_id)
Remove a story page and associated story page elements.
Definition: story.cpp:382
CMD_UPDATE_STORY_PAGE_ELEMENT
@ CMD_UPDATE_STORY_PAGE_ELEMENT
update a story page element
Definition: command_type.h:308
CmdCreateStoryPage
std::tuple< CommandCost, StoryPageID > CmdCreateStoryPage(DoCommandFlag flags, CompanyID company, const std::string &text)
Create a new story page.
Definition: story.cpp:209
CMD_STR_CTRL
@ CMD_STR_CTRL
the command's string may contain control strings
Definition: command_type.h:401
StoryPageID
uint16_t StoryPageID
ID of a story page.
Definition: story_type.h:16
company_type.h
CmdSetStoryPageTitle
CommandCost CmdSetStoryPageTitle(DoCommandFlag flags, StoryPageID page_id, const std::string &text)
Update title of a story page.
Definition: story.cpp:320
CmdUpdateStoryPageElement
CommandCost CmdUpdateStoryPageElement(DoCommandFlag flags, TileIndex tile, StoryPageElementID page_element_id, uint32_t reference, const std::string &text)
Update a new story page element.
Definition: story.cpp:294