summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_road.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-03-26 19:45:45 +0000
committerfrosch <frosch@openttd.org>2009-03-26 19:45:45 +0000
commit44351cdc57f470e7fc1213e4b0b2f6b1f42e71ac (patch)
tree6d5983772ba02edc87bbe4128a094205c7955ba1 /src/ai/api/ai_road.hpp
parent19b47c1e89ea7923fa0059075aee6ce5d60be48a (diff)
downloadopenttd-44351cdc57f470e7fc1213e4b0b2f6b1f42e71ac.tar.xz
(svn r15860) -Add: AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop.
Diffstat (limited to 'src/ai/api/ai_road.hpp')
-rw-r--r--src/ai/api/ai_road.hpp8
1 files changed, 8 insertions, 0 deletions
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
@@ -57,6 +57,14 @@ public:
};
/**
+ * 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
* stations, but includes drive through stations.