Update to 14.0-beta1
This commit is contained in:
@@ -17,14 +17,20 @@
|
||||
#include "../goal_type.h"
|
||||
#include "../story_type.h"
|
||||
|
||||
#include "script_log_types.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* The callback function for Mode-classes.
|
||||
*/
|
||||
typedef bool (ScriptModeProc)();
|
||||
|
||||
/**
|
||||
* The callback function for Async Mode-classes.
|
||||
*/
|
||||
typedef bool (ScriptAsyncModeProc)();
|
||||
|
||||
/**
|
||||
* The storage for each script. It keeps track of important information.
|
||||
*/
|
||||
@@ -33,6 +39,9 @@ friend class ScriptObject;
|
||||
private:
|
||||
ScriptModeProc *mode; ///< The current build mode we are int.
|
||||
class ScriptObject *mode_instance; ///< The instance belonging to the current build mode.
|
||||
ScriptAsyncModeProc *async_mode; ///< The current command async mode we are in.
|
||||
class ScriptObject *async_mode_instance; ///< The instance belonging to the current command async mode.
|
||||
bool time_mode; ///< True if we in calendar time mode, or false (default) if we are in economy time mode.
|
||||
CompanyID root_company; ///< The root company, the company that the script really belongs to.
|
||||
CompanyID company; ///< The current company.
|
||||
|
||||
@@ -54,12 +63,15 @@ private:
|
||||
RailType rail_type; ///< The current railtype we build.
|
||||
|
||||
void *event_data; ///< Pointer to the event data storage.
|
||||
void *log_data; ///< Pointer to the log data storage.
|
||||
ScriptLogTypes::LogData log_data;///< Log data storage.
|
||||
|
||||
public:
|
||||
ScriptStorage() :
|
||||
mode (nullptr),
|
||||
mode_instance (nullptr),
|
||||
async_mode (nullptr),
|
||||
async_mode_instance (nullptr),
|
||||
time_mode (false),
|
||||
root_company (INVALID_OWNER),
|
||||
company (INVALID_OWNER),
|
||||
delay (1),
|
||||
@@ -72,8 +84,7 @@ public:
|
||||
/* calback_value (can't be set) */
|
||||
road_type (INVALID_ROADTYPE),
|
||||
rail_type (INVALID_RAILTYPE),
|
||||
event_data (nullptr),
|
||||
log_data (nullptr)
|
||||
event_data (nullptr)
|
||||
{ }
|
||||
|
||||
~ScriptStorage();
|
||||
|
||||
Reference in New Issue
Block a user