ai_storage.hpp

Go to the documentation of this file.
00001 /* $Id: ai_storage.hpp 15060 2009-01-13 15:44:36Z smatz $ */
00002 
00005 #ifndef AI_STORAGE_HPP
00006 #define AI_STORAGE_HPP
00007 
00008 #include "../command_func.h"
00009 #include "../map_func.h"
00010 #include "../network/network.h"
00011 #include "../company_func.h"
00012 #include "../signs_func.h"
00013 #include "../tunnelbridge.h"
00014 #include "../vehicle_func.h"
00015 #include "../group.h"
00016 
00017 #include <vector>
00018 
00022 typedef bool (AIModeProc)(TileIndex tile, uint32 p1, uint32 p2, uint procc, CommandCost costs);
00023 
00027 class AIStorage {
00028 friend class AIObject;
00029 private:
00030   AIModeProc *mode;                
00031   class AIObject *mode_instance;   
00032 
00033   uint delay;                      
00034   bool allow_do_command;           
00035 
00036   CommandCost costs;               
00037   Money last_cost;                 
00038   uint last_error;                 
00039   bool last_command_res;           
00040 
00041   VehicleID new_vehicle_id;        
00042   SignID new_sign_id;              
00043   TileIndex new_tunnel_endtile;    
00044   GroupID new_group_id;            
00045 
00046   std::vector<int> callback_value; 
00047 
00048   RoadType road_type;              
00049   RailType rail_type;              
00050 
00051   void *event_data;                
00052   void *log_data;                  
00053 
00054 public:
00055   AIStorage() :
00056     mode              (NULL),
00057     mode_instance     (NULL),
00058     delay             (1),
00059     allow_do_command  (true),
00060     /* costs (can't be set) */
00061     last_cost         (0),
00062     last_error        (STR_NULL),
00063     last_command_res  (true),
00064     new_vehicle_id    (0),
00065     new_sign_id       (0),
00066     new_tunnel_endtile(INVALID_TILE),
00067     new_group_id      (0),
00068     /* calback_value (can't be set) */
00069     road_type         (INVALID_ROADTYPE),
00070     rail_type         (INVALID_RAILTYPE),
00071     event_data        (NULL),
00072     log_data          (NULL)
00073   { }
00074 
00075   ~AIStorage();
00076 };
00077 
00078 #endif /* AI_STORAGE_HPP */

Generated on Mon Mar 9 23:33:45 2009 for openttd by  doxygen 1.5.6