Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SCRIPT_STORAGE_HPP
00013 #define SCRIPT_STORAGE_HPP
00014
00015 #include "../signs_func.h"
00016 #include "../vehicle_func.h"
00017 #include "../road_type.h"
00018 #include "../group.h"
00019 #include "../goal_type.h"
00020
00021 #include "table/strings.h"
00022 #include <vector>
00023
00027 typedef bool (ScriptModeProc)();
00028
00032 class ScriptStorage {
00033 friend class ScriptObject;
00034 private:
00035 ScriptModeProc *mode;
00036 class ScriptObject *mode_instance;
00037 CompanyID root_company;
00038 CompanyID company;
00039
00040 uint delay;
00041 bool allow_do_command;
00042
00043 CommandCost costs;
00044 Money last_cost;
00045 uint last_error;
00046 bool last_command_res;
00047
00048 VehicleID new_vehicle_id;
00049 SignID new_sign_id;
00050 GroupID new_group_id;
00051 GoalID new_goal_id;
00052
00053 std::vector<int> callback_value;
00054
00055 RoadType road_type;
00056 RailType rail_type;
00057
00058 void *event_data;
00059 void *log_data;
00060
00061 public:
00062 ScriptStorage() :
00063 mode (NULL),
00064 mode_instance (NULL),
00065 root_company (INVALID_OWNER),
00066 company (INVALID_OWNER),
00067 delay (1),
00068 allow_do_command (true),
00069
00070 last_cost (0),
00071 last_error (STR_NULL),
00072 last_command_res (true),
00073 new_vehicle_id (0),
00074 new_sign_id (0),
00075 new_group_id (0),
00076
00077 road_type (INVALID_ROADTYPE),
00078 rail_type (INVALID_RAILTYPE),
00079 event_data (NULL),
00080 log_data (NULL)
00081 { }
00082
00083 ~ScriptStorage();
00084 };
00085
00086 #endif