diff options
author | yexo <yexo@openttd.org> | 2009-04-26 16:14:53 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-04-26 16:14:53 +0000 |
commit | 9101de49d8fbc0b1f5e067ca2cd8c5906f30e84a (patch) | |
tree | b441111de37f81dab27a535c5c3fe41360ba5fc6 /src/ai/api/ai_vehicle.hpp | |
parent | 779640b53a212091e929a2d7603474ab7b2710f8 (diff) | |
download | openttd-9101de49d8fbc0b1f5e067ca2cd8c5906f30e84a.tar.xz |
(svn r16165) -Add [FS#2801] [NoAI]: several functions to AIOrder to check the what kind of order an order is.
-Fix: AIOrder::GetOrderDestination and AIOrder::GetOrderFlags didn't work on ORDER_CURRENT when the vehicle was loading/leaving in a station.
Diffstat (limited to 'src/ai/api/ai_vehicle.hpp')
-rw-r--r-- | src/ai/api/ai_vehicle.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp index bc2360b40..f726a8331 100644 --- a/src/ai/api/ai_vehicle.hpp +++ b/src/ai/api/ai_vehicle.hpp @@ -432,6 +432,16 @@ public: static bool SendVehicleToDepot(VehicleID vehicle_id); /** + * Sends the given vehicle to a depot for servicing. If the vehicle has + * already been sent to a depot it continues with its normal orders instead. + * @param vehicle_id The vehicle to send to a depot for servicing. + * @pre IsValidVehicle(vehicle_id). + * @exception AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT + * @return True if the current order was changed. + */ + static bool SendVehicleToDepotForServicing(VehicleID vehicle_id); + + /** * Starts or stops the given vehicle depending on the current state. * @param vehicle_id The vehicle to start/stop. * @pre IsValidVehicle(vehicle_id). |