10 #ifndef SCRIPT_STORAGE_HPP
11 #define SCRIPT_STORAGE_HPP
13 #include "../signs_func.h"
14 #include "../vehicle_func.h"
15 #include "../road_type.h"
17 #include "../goal_type.h"
18 #include "../story_type.h"
20 #include "script_log_types.hpp"
22 #include "table/strings.h"
38 friend class ScriptObject;
Common return value for all commands.
The storage for each script.
ScriptLogTypes::LogData log_data
Log data storage.
CommandDataBuffer last_cmd_ret
The extra data returned by the last command.
void * event_data
Pointer to the event data storage.
RailType rail_type
The current railtype we build.
CompanyID root_company
The root company, the company that the script really belongs to.
uint delay
The ticks of delay each DoCommand has.
class ScriptObject * async_mode_instance
The instance belonging to the current command async mode.
CommandDataBuffer last_data
The last data passed to a command.
std::vector< int > callback_value
The values which need to survive a callback.
Money last_cost
The last cost of the command.
bool allow_do_command
Is the usage of DoCommands restricted?
ScriptAsyncModeProc * async_mode
The current command async mode we are in.
class ScriptObject * mode_instance
The instance belonging to the current build mode.
RoadType road_type
The current roadtype we build.
CommandCost costs
The costs the script is tracking.
ScriptModeProc * mode
The current build mode we are int.
bool last_command_res
The last result of the command.
Commands last_cmd
The last cmd passed to a command.
CompanyID company
The current company.
uint last_error
The last error of the command.
std::vector< uint8_t > CommandDataBuffer
Storage buffer for serialized command data.
Commands
List of commands.
@ CMD_END
Must ALWAYS be on the end of this list!! (period)
Owner
Enum for all companies/owners.
@ INVALID_OWNER
An invalid owner.
RailType
Enumeration for all possible railtypes.
@ INVALID_RAILTYPE
Flag for invalid railtype.
RoadType
The different roadtypes we support.
@ INVALID_ROADTYPE
flag for invalid roadtype
bool() ScriptAsyncModeProc()
The callback function for Async Mode-classes.
bool() ScriptModeProc()
The callback function for Mode-classes.