diff --git a/src/ai/api/ai_types.hpp b/src/ai/api/ai_types.hpp index 45db6b324f..9653cda03c 100644 --- a/src/ai/api/ai_types.hpp +++ b/src/ai/api/ai_types.hpp @@ -1,6 +1,75 @@ /* $Id$ */ -/** @file ai_types.hpp Defines all the types of the game, like VehicleID, .... */ +/** @file ai_types.hpp Defines all the types of the game, like IDs of various objects. + * + * IDs are used to identify certain objects. They are only unique within the object type, so for example a vehicle may have VehicleID 2009, + * while a station has StationID 2009 at the same time. Also IDs are assigned arbitrary, you cannot assume them to be consecutive. + * Also note, that some IDs are static and never change, while others are allocated dynamically and might be + * reused for other objects once they are released. So be careful, which IDs you store for which purpose and whether they stay valid all the time. + * + *
type | object | + *acquired | + *released | + *reused |
---|---|---|---|---|
#BridgeID | bridge type | + *introduction \ref newgrf_changes "(1)" | + *never \ref newgrf_changes "(1)" | + *no \ref newgrf_changes "(1)" |
#CargoID | cargo type | + *game start \ref newgrf_changes "(1)" | + *never \ref newgrf_changes "(1)" | + *no \ref newgrf_changes "(1)" |
#EngineID | engine type | + *introduction, preview \ref dynamic_engines "(2)" | + *engines retires \ref dynamic_engines "(2)" | + *no \ref dynamic_engines "(2)" |
#GroupID | vehicle group | + *creation | + *deletion | + *yes |
#IndustyID | industry | + *construction | + *closure | + *yes |
#IndustyType | industry type | + *game start \ref newgrf_changes "(1)" | + *never \ref newgrf_changes "(1)" | + *no |
#SignID | sign | + *construction | + *deletion | + *yes |
#StationID | station | + *construction | + *expiration of 'grey' station sign after deletion | + *yes |
#SubsidyID | subsidy | + *offer announcement | + *(offer) expiration | + *yes |
#TileIndex | tile on map | + *game start | + *never | + *no |
#TownID | town | + *game start | + *never | + *no |
#VehicleID | vehicle | + *construction, autorenew, autoreplace | + *destruction, autorenew, autoreplace | + *yes |
#WaypointID | waypoint | + *construction | + *destruction | + *yes |