(svn r15860) -Add: AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop.

This commit is contained in:
frosch
2009-03-26 19:45:45 +00:00
parent 6f15901769
commit 779a9f4e24
5 changed files with 32 additions and 0 deletions

View File

@@ -56,6 +56,14 @@ public:
ROADVEHTYPE_TRUCK, //!< Build objects useable for trucks and cargo trams
};
/**
* Determines whether a busstop or a truckstop is needed to transport a certain cargo.
* @param cargo_type The cargo to test.
* @pre AICargo::IsValidCargo(cargo_type).
* @return The road vehicle type needed to transport the cargo.
*/
static RoadVehicleType GetRoadVehicleTypeForCargo(CargoID cargo_type);
/**
* Checks whether the given tile is actually a tile with road that can be
* used to traverse a tile. This excludes road depots and 'normal' road