diff options
author | yexo <yexo@openttd.org> | 2009-03-12 11:43:40 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-03-12 11:43:40 +0000 |
commit | cef662825b27f5c934efeadd6112888e8b97a061 (patch) | |
tree | 036f263970898122c11bfe14edff539e64fb1b9e /src/ai/api/ai_order.hpp | |
parent | 9eef8f77e2ed4a8fe297b70feb69cf311b906a91 (diff) | |
download | openttd-cef662825b27f5c934efeadd6112888e8b97a061.tar.xz |
(svn r15684) -Add [NoAI]: AIOrder::SkipToOrder().
Diffstat (limited to 'src/ai/api/ai_order.hpp')
-rw-r--r-- | src/ai/api/ai_order.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ai/api/ai_order.hpp b/src/ai/api/ai_order.hpp index c39513f19..dd26c819c 100644 --- a/src/ai/api/ai_order.hpp +++ b/src/ai/api/ai_order.hpp @@ -331,7 +331,7 @@ public: * Removes an order from the vehicle's order list. * @param vehicle_id The vehicle to remove the order from. * @param order_position The order to remove from the order list. - * @pre AIVehicle::IsValidVehicleOrder(vehicle_id, order_position). + * @pre IsValidVehicleOrder(vehicle_id, order_position). * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY * @return True if and only if the order was removed. */ @@ -378,6 +378,16 @@ public: static bool MoveOrder(VehicleID vehicle_id, OrderPosition order_position_move, OrderPosition order_position_target); /** + * Make a vehicle execute next_order instead of its current order. + * @param vehicle_id The vehicle that should skip some orders. + * @param next_order The order the vehicle should skip to. + * @pre IsValidVehicleOrder(vehicle_id, next_order). + * @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY + * @return True if and only the current order was changed. + */ + static bool SkipToOrder(VehicleID vehicle_id, OrderPosition next_order); + + /** * Copies the orders from another vehicle. The orders of the main vehicle * are going to be the orders of the changed vehicle. * @param vehicle_id The vehicle to copy the orders to. |