OpenTTD Source  20241121-master-g67a0fccfad
ScriptStorage Class Reference

The storage for each script. More...

#include <script_storage.hpp>

Private Attributes

ScriptModeProcmode
 The current build mode we are int.
 
class ScriptObject * mode_instance
 The instance belonging to the current build mode.
 
ScriptAsyncModeProcasync_mode
 The current command async mode we are in.
 
class ScriptObject * async_mode_instance
 The instance belonging to the current command async mode.
 
CompanyID root_company
 The root company, the company that the script really belongs to.
 
CompanyID company
 The current company.
 
uint delay
 The ticks of delay each DoCommand has.
 
bool allow_do_command
 Is the usage of DoCommands restricted?
 
CommandCost costs
 The costs the script is tracking.
 
Money last_cost
 The last cost of the command.
 
uint last_error
 The last error of the command.
 
bool last_command_res
 The last result of the command.
 
CommandDataBuffer last_data
 The last data passed to a command.
 
Commands last_cmd
 The last cmd passed to a command.
 
CommandDataBuffer last_cmd_ret
 The extra data returned by the last command.
 
std::vector< int > callback_value
 The values which need to survive a callback.
 
RoadType road_type
 The current roadtype we build.
 
RailType rail_type
 The current railtype we build.
 
void * event_data
 Pointer to the event data storage.
 
ScriptLogTypes::LogData log_data
 Log data storage.
 

Friends

class ScriptObject
 

Detailed Description

The storage for each script.

It keeps track of important information.

Definition at line 37 of file script_storage.hpp.


The documentation for this class was generated from the following files: