src/ai/api/ai_order.hpp
branchnoai
changeset 9707 a5f233287295
parent 9596 8af5a1399842
child 9737 ee408edf3851
equal deleted inserted replaced
9706:8d8f719a4e69 9707:a5f233287295
   127 	 * @return true if and only if the order was changed.
   127 	 * @return true if and only if the order was changed.
   128 	 */
   128 	 */
   129 	bool ChangeOrder(VehicleID vehicle_id, uint32 order_id, AIOrderFlags order_flags);
   129 	bool ChangeOrder(VehicleID vehicle_id, uint32 order_id, AIOrderFlags order_flags);
   130 
   130 
   131 	/**
   131 	/**
       
   132 	 * Move an order inside the orderlist
       
   133 	 * @param vehicle_id  the vehicle to move the orders.
       
   134 	 * @param order_id_move    the order to move.
       
   135 	 * @param order_id_target  the target order
       
   136 	 * @pre IsValidVehicleOrder(vehicle_id, order_id_move).
       
   137 	 * @pre IsValidVehicleOrder(vehicle_id, order_id_target).
       
   138 	 * @return true if and only if the order was moved.
       
   139 	 * @note If the order is moved to a lower place (e.g. from 7 to 2)
       
   140 	 *  the target order is moved upwards (e.g. 3). If the order is moved
       
   141 	 *  to a higher place (e.g. from 7 to 9) the target will be moved
       
   142 	 *  downwards (e.g. 8).
       
   143 	 */
       
   144 	bool MoveOrder(VehicleID vehicle_id, uint32 order_id_move, uint32 order_id_target);
       
   145 
       
   146 	/**
   132 	 * Copies the orders from another vehicle. The orders of the main
   147 	 * Copies the orders from another vehicle. The orders of the main
   133 	 * vehicle are going to be the orders of the changed vehicle.
   148 	 * vehicle are going to be the orders of the changed vehicle.
   134 	 * @param vehicle_id      the vehicle to copy the orders to.
   149 	 * @param vehicle_id      the vehicle to copy the orders to.
   135 	 * @param main_vehicle_id the vehicle to copy the orders from.
   150 	 * @param main_vehicle_id the vehicle to copy the orders from.
   136 	 * @pre AIVehicle::IsValidVehicle(vehicle_id).
   151 	 * @pre AIVehicle::IsValidVehicle(vehicle_id).