src/newgrf_generic.h
changeset 8544 47b99dc2da26
child 9111 48ce04029fe4
equal deleted inserted replaced
8543:87899423775d 8544:47b99dc2da26
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef NEWGRF_GENERIC_H
       
     4 #define NEWGRF_GENERIC_H
       
     5 
       
     6 enum AIConstructionEvent {
       
     7 	AICE_TRAIN_CHECK_RAIL_ENGINE     = 0x00, ///< Check if we should build an engine
       
     8 	AICE_TRAIN_CHECK_ELRAIL_ENGINE   = 0x01,
       
     9 	AICE_TRAIN_CHECK_MONORAIL_ENGINE = 0x02,
       
    10 	AICE_TRAIN_CHECK_MAGLEV_ENGINE   = 0x03,
       
    11 	AICE_TRAIN_GET_RAIL_WAGON        = 0x08,
       
    12 	AICE_TRAIN_GET_ELRAIL_WAGON      = 0x09,
       
    13 	AICE_TRAIN_GET_MONORAIL_WAGON    = 0x0A,
       
    14 	AICE_TRAIN_GET_MAGLEV_WAGON      = 0x0B,
       
    15 	AICE_TRAIN_GET_RAILTYPE          = 0x0F,
       
    16 
       
    17 	AICE_ROAD_CHECK_ENGINE           = 0x00, ///< Check if we should build an engine
       
    18 	AICE_ROAD_GET_FIRST_ENGINE       = 0x01, ///< Unused, we check all
       
    19 	AICE_ROAD_GET_NUMBER_ENGINES     = 0x02, ///< Unused, we check all
       
    20 
       
    21 	AICE_SHIP_CHECK_ENGINE           = 0x00, ///< Check if we should build an engine
       
    22 	AICE_SHIP_GET_FIRST_ENGINE       = 0x01, ///< Unused, we check all
       
    23 	AICE_SHIP_GET_NUMBER_ENGINES     = 0x02, ///< Unused, we check all
       
    24 
       
    25 	AICE_AIRCRAFT_CHECK_ENGINE       = 0x00, ///< Check if we should build an engine
       
    26 
       
    27 	AICE_STATION_GET_STATION_ID      = 0x00, ///< Get a station ID to build
       
    28 };
       
    29 
       
    30 void ResetGenericCallbacks();
       
    31 void AddGenericCallback(uint8 feature, const struct GRFFile *file, const struct SpriteGroup *group);
       
    32 
       
    33 uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 default_selection, IndustryType src_industry, IndustryType dst_industry, uint8 distance, AIConstructionEvent event, uint8 count, uint8 station_size, const struct GRFFile **file);
       
    34 
       
    35 #endif /* NEWGRF_GENERIC_H */