From 44351cdc57f470e7fc1213e4b0b2f6b1f42e71ac Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 26 Mar 2009 19:45:45 +0000 Subject: (svn r15860) -Add: AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop. --- src/ai/api/ai_road.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ai/api/ai_road.hpp') diff --git a/src/ai/api/ai_road.hpp b/src/ai/api/ai_road.hpp index e899af771..7bd26922d 100644 --- a/src/ai/api/ai_road.hpp +++ b/src/ai/api/ai_road.hpp @@ -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 -- cgit v1.2.3-54-g00ecf