ai_storage.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef AI_STORAGE_HPP
00013 #define AI_STORAGE_HPP
00014
00015 #include "../command_func.h"
00016 #include "../map_func.h"
00017 #include "../network/network.h"
00018 #include "../company_func.h"
00019 #include "../signs_func.h"
00020 #include "../tunnelbridge.h"
00021 #include "../vehicle_func.h"
00022 #include "../group.h"
00023
00024 #include <vector>
00025
00029 typedef bool (AIModeProc)(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
00030
00034 class AIStorage {
00035 friend class AIObject;
00036 private:
00037 AIModeProc *mode;
00038 class AIObject *mode_instance;
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 TileIndex new_tunnel_endtile;
00051 GroupID new_group_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 AIStorage() :
00063 mode (NULL),
00064 mode_instance (NULL),
00065 delay (1),
00066 allow_do_command (true),
00067
00068 last_cost (0),
00069 last_error (STR_NULL),
00070 last_command_res (true),
00071 new_vehicle_id (0),
00072 new_sign_id (0),
00073 new_tunnel_endtile(INVALID_TILE),
00074 new_group_id (0),
00075
00076 road_type (INVALID_ROADTYPE),
00077 rail_type (INVALID_RAILTYPE),
00078 event_data (NULL),
00079 log_data (NULL)
00080 { }
00081
00082 ~AIStorage();
00083 };
00084
00085 #endif