peter1138@8544: /* $Id$ */ peter1138@8544: rubidium@9111: /** @file newgrf_generic.h Functions related to generic callbacks. */ rubidium@9111: peter1138@8544: #ifndef NEWGRF_GENERIC_H peter1138@8544: #define NEWGRF_GENERIC_H peter1138@8544: peter1138@8544: enum AIConstructionEvent { peter1138@8544: AICE_TRAIN_CHECK_RAIL_ENGINE = 0x00, ///< Check if we should build an engine peter1138@8544: AICE_TRAIN_CHECK_ELRAIL_ENGINE = 0x01, peter1138@8544: AICE_TRAIN_CHECK_MONORAIL_ENGINE = 0x02, peter1138@8544: AICE_TRAIN_CHECK_MAGLEV_ENGINE = 0x03, peter1138@8544: AICE_TRAIN_GET_RAIL_WAGON = 0x08, peter1138@8544: AICE_TRAIN_GET_ELRAIL_WAGON = 0x09, peter1138@8544: AICE_TRAIN_GET_MONORAIL_WAGON = 0x0A, peter1138@8544: AICE_TRAIN_GET_MAGLEV_WAGON = 0x0B, peter1138@8544: AICE_TRAIN_GET_RAILTYPE = 0x0F, peter1138@8544: peter1138@8544: AICE_ROAD_CHECK_ENGINE = 0x00, ///< Check if we should build an engine peter1138@8544: AICE_ROAD_GET_FIRST_ENGINE = 0x01, ///< Unused, we check all peter1138@8544: AICE_ROAD_GET_NUMBER_ENGINES = 0x02, ///< Unused, we check all peter1138@8544: peter1138@8544: AICE_SHIP_CHECK_ENGINE = 0x00, ///< Check if we should build an engine peter1138@8544: AICE_SHIP_GET_FIRST_ENGINE = 0x01, ///< Unused, we check all peter1138@8544: AICE_SHIP_GET_NUMBER_ENGINES = 0x02, ///< Unused, we check all peter1138@8544: peter1138@8544: AICE_AIRCRAFT_CHECK_ENGINE = 0x00, ///< Check if we should build an engine peter1138@8544: peter1138@8544: AICE_STATION_GET_STATION_ID = 0x00, ///< Get a station ID to build peter1138@8544: }; peter1138@8544: peter1138@8544: void ResetGenericCallbacks(); peter1138@8544: void AddGenericCallback(uint8 feature, const struct GRFFile *file, const struct SpriteGroup *group); peter1138@8544: peter1138@8544: 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); peter1138@8544: peter1138@8544: #endif /* NEWGRF_GENERIC_H */