summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_vehiclelist.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-09 09:46:08 +0000
committerrubidium <rubidium@openttd.org>2009-09-09 09:46:08 +0000
commitf3f6eaa6dc715531cbf92ff84e175e5add3a4688 (patch)
tree0d189d038d80dc1e1467c6d85d86482dcd2d10fb /src/ai/api/ai_vehiclelist.hpp
parentf1cc044a4021362f1826378b129ecef1210a6a0d (diff)
downloadopenttd-f3f6eaa6dc715531cbf92ff84e175e5add3a4688.tar.xz
(svn r17486) -Add [NoAI]: a vehicle list for all vehicle that are ordered to a specific depot
Diffstat (limited to 'src/ai/api/ai_vehiclelist.hpp')
-rw-r--r--src/ai/api/ai_vehiclelist.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ai/api/ai_vehiclelist.hpp b/src/ai/api/ai_vehiclelist.hpp
index edc0035e4..ac868ead3 100644
--- a/src/ai/api/ai_vehiclelist.hpp
+++ b/src/ai/api/ai_vehiclelist.hpp
@@ -41,6 +41,24 @@ public:
};
/**
+ * Creates a list of vehicles that have orders to a given depot.
+ * The list is created with a tile. If the tile is part of an airport all
+ * aircraft having a depot order on a hangar of that airport will be
+ * returned. For all other vehicle types the tile has to be a depot or
+ * an empty list will be returned.
+ * @ingroup AIList
+ */
+class AIVehicleList_Depot : public AIAbstractList {
+public:
+ static const char *GetClassName() { return "AIVehicleList_Depot"; }
+
+ /**
+ * @param tile The tile of the depot to get the list of vehicles from, which have orders to it.
+ */
+ AIVehicleList_Depot(TileIndex tile);
+};
+
+/**
* Creates a list of vehicles that share orders.
* @ingroup AIList
*/