#include <ai_order.hpp>
Public Types | |
enum | ErrorMessages { ERR_ORDER_BASE = AIError::ERR_CAT_ORDER << AIError::ERR_CAT_BIT_SIZE, ERR_ORDER_TOO_MANY, ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION } |
All order related error messages. More... | |
enum | AIOrderFlags { AIOF_NONE = 0, AIOF_NON_STOP_INTERMEDIATE = 1 << 0, AIOF_NON_STOP_DESTINATION = 1 << 1, AIOF_UNLOAD = 1 << 2, AIOF_TRANSFER = 1 << 3, AIOF_NO_UNLOAD = 1 << 4, AIOF_FULL_LOAD = 2 << 5, AIOF_FULL_LOAD_ANY = 3 << 5, AIOF_NO_LOAD = 1 << 7, AIOF_SERVICE_IF_NEEDED = 1 << 2, AIOF_NON_STOP_FLAGS = AIOF_NON_STOP_INTERMEDIATE | AIOF_NON_STOP_DESTINATION, AIOF_UNLOAD_FLAGS = AIOF_TRANSFER | AIOF_UNLOAD | AIOF_NO_UNLOAD, AIOF_LOAD_FLAGS = AIOF_FULL_LOAD | AIOF_FULL_LOAD_ANY | AIOF_NO_LOAD, AIOF_INVALID = 0xFFFF } |
Flags that can be used to modify the behaviour of orders. More... | |
enum | OrderCondition { OC_LOAD_PERCENTAGE, OC_RELIABILITY, OC_MAX_SPEED, OC_AGE, OC_REQUIRES_SERVICE, OC_UNCONDITIONALLY, OC_INVALID = -1 } |
All conditions a conditional order can depend on. More... | |
enum | CompareFunction { CF_EQUALS, CF_NOT_EQUALS, CF_LESS_THAN, CF_LESS_EQUALS, CF_MORE_THAN, CF_MORE_EQUALS, CF_IS_TRUE, CF_IS_FALSE, CF_INVALID = -1 } |
Comparators for conditional orders. More... | |
enum | OrderPosition { ORDER_CURRENT = 0xFF, ORDER_INVALID = -1 } |
Different constants related to the OrderPosition. More... | |
Static Public Member Functions | |
static const char * | GetClassName () |
static bool | IsValidVehicleOrder (VehicleID vehicle_id, OrderPosition order_position) |
Checks whether the given order id is valid for the given vehicle. | |
static bool | IsConditionalOrder (VehicleID vehicle_id, OrderPosition order_position) |
Checks whether the given order is a conditional order. | |
static OrderPosition | ResolveOrderPosition (VehicleID vehicle_id, OrderPosition order_position) |
Resolves the given order index to the correct index for the given vehicle. | |
static bool | AreOrderFlagsValid (TileIndex destination, AIOrderFlags order_flags) |
Checks whether the given order flags are valid for the given destination. | |
static bool | IsValidConditionalOrder (OrderCondition condition, CompareFunction compare) |
Checks whether the given combination of condition and compare function is valid. | |
static int32 | GetOrderCount (VehicleID vehicle_id) |
Returns the number of orders for the given vehicle. | |
static TileIndex | GetOrderDestination (VehicleID vehicle_id, OrderPosition order_position) |
Gets the destination of the given order for the given vehicle. | |
static AIOrderFlags | GetOrderFlags (VehicleID vehicle_id, OrderPosition order_position) |
Gets the AIOrderFlags of the given order for the given vehicle. | |
static OrderPosition | GetOrderJumpTo (VehicleID vehicle_id, OrderPosition order_position) |
Gets the OrderPosition to jump to if the check succeeds of the given order for the given vehicle. | |
static OrderCondition | GetOrderCondition (VehicleID vehicle_id, OrderPosition order_position) |
Gets the OrderCondition of the given order for the given vehicle. | |
static CompareFunction | GetOrderCompareFunction (VehicleID vehicle_id, OrderPosition order_position) |
Gets the CompareFunction of the given order for the given vehicle. | |
static int32 | GetOrderCompareValue (VehicleID vehicle_id, OrderPosition order_position) |
Gets the value to compare against of the given order for the given vehicle. | |
static bool | SetOrderJumpTo (VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to) |
Sets the OrderPosition to jump to if the check succeeds of the given order for the given vehicle. | |
static bool | SetOrderCondition (VehicleID vehicle_id, OrderPosition order_position, OrderCondition condition) |
Sets the OrderCondition of the given order for the given vehicle. | |
static bool | SetOrderCompareFunction (VehicleID vehicle_id, OrderPosition order_position, CompareFunction compare) |
Sets the CompareFunction of the given order for the given vehicle. | |
static bool | SetOrderCompareValue (VehicleID vehicle_id, OrderPosition order_position, int32 value) |
Sets the value to compare against of the given order for the given vehicle. | |
static bool | AppendOrder (VehicleID vehicle_id, TileIndex destination, AIOrderFlags order_flags) |
Appends an order to the end of the vehicle's order list. | |
static bool | AppendConditionalOrder (VehicleID vehicle_id, OrderPosition jump_to) |
Appends a conditional order to the end of the vehicle's order list. | |
static bool | InsertOrder (VehicleID vehicle_id, OrderPosition order_position, TileIndex destination, AIOrderFlags order_flags) |
Inserts an order before the given order_position into the vehicle's order list. | |
static bool | InsertConditionalOrder (VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to) |
Appends a conditional order before the given order_position into the vehicle's order list. | |
static bool | RemoveOrder (VehicleID vehicle_id, OrderPosition order_position) |
Removes an order from the vehicle's order list. | |
static bool | _SetOrderFlags () |
Internal function to help SetOrderFlags. | |
static bool | SetOrderFlags (VehicleID vehicle_id, OrderPosition order_position, AIOrderFlags order_flags) |
Changes the order flags of the given order. | |
static bool | ChangeOrder (VehicleID vehicle_id, OrderPosition order_position, AIOrderFlags order_flags) |
Deprecated, use SetOrderFlags instead. | |
static bool | MoveOrder (VehicleID vehicle_id, OrderPosition order_position_move, OrderPosition order_position_target) |
Move an order inside the orderlist. | |
static bool | CopyOrders (VehicleID vehicle_id, VehicleID main_vehicle_id) |
Copies the orders from another vehicle. | |
static bool | ShareOrders (VehicleID vehicle_id, VehicleID main_vehicle_id) |
Shares the orders between two vehicles. | |
static bool | UnshareOrders (VehicleID vehicle_id) |
Removes the given vehicle from a shared orders list. |
Definition at line 14 of file ai_order.hpp.
All order related error messages.
Definition at line 21 of file ai_order.hpp.
Flags that can be used to modify the behaviour of orders.
Definition at line 35 of file ai_order.hpp.
All conditions a conditional order can depend on.
OC_LOAD_PERCENTAGE | Skip based on the amount of load, value is in tons. |
OC_RELIABILITY | Skip based on the reliability, value is percent (0..100). |
OC_MAX_SPEED | Skip based on the maximum speed, value is in OpenTTD's internal speed unit, see AIEngine::GetMaxSpeed. |
OC_AGE | Skip based on the age, value is in years. |
OC_REQUIRES_SERVICE | Skip when the vehicle requires service, no value. |
OC_UNCONDITIONALLY | Always skip, no compare function, no value. |
OC_INVALID | An invalid condition, do not use. |
Definition at line 75 of file ai_order.hpp.
Comparators for conditional orders.
Definition at line 89 of file ai_order.hpp.
Different constants related to the OrderPosition.
ORDER_CURRENT | Constant that gets resolved to the current order. |
ORDER_INVALID | An invalid order. |
Definition at line 103 of file ai_order.hpp.
bool AIOrder::IsValidVehicleOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Checks whether the given order id is valid for the given vehicle.
vehicle_id | The vehicle to check the order index for. | |
order_position | The order index to check. |
Definition at line 41 of file ai_order.cpp.
References AIVehicle::IsValidVehicle(), and ORDER_CURRENT.
Referenced by _SetOrderFlags(), AppendConditionalOrder(), GetOrderCompareFunction(), GetOrderCompareValue(), GetOrderCondition(), GetOrderDestination(), GetOrderFlags(), GetOrderJumpTo(), InsertConditionalOrder(), IsConditionalOrder(), MoveOrder(), RemoveOrder(), SetOrderCompareFunction(), SetOrderCompareValue(), SetOrderCondition(), SetOrderJumpTo(), and AIVehicle::SkipToVehicleOrder().
bool AIOrder::IsConditionalOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Checks whether the given order is a conditional order.
vehicle_id | The vehicle to check. | |
order_position | The order index to check. |
Definition at line 46 of file ai_order.cpp.
References IsValidVehicleOrder(), and ORDER_CURRENT.
Referenced by GetOrderCompareFunction(), GetOrderCompareValue(), GetOrderCondition(), GetOrderJumpTo(), SetOrderCompareFunction(), SetOrderCompareValue(), SetOrderCondition(), and SetOrderJumpTo().
AIOrder::OrderPosition AIOrder::ResolveOrderPosition | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Resolves the given order index to the correct index for the given vehicle.
If the order index was ORDER_CURRENT it will be resolved to the index of the current order (as shown in the order list). If the order with the given index does not exist it will return ORDER_INVALID.
vehicle_id | The vehicle to check the order index for. | |
order_position | The order index to resolve. |
Definition at line 55 of file ai_order.cpp.
References AIVehicle::IsValidVehicle(), ORDER_CURRENT, and ORDER_INVALID.
Referenced by _SetOrderFlags(), InsertConditionalOrder(), InsertOrder(), MoveOrder(), RemoveOrder(), and AIVehicle::SkipToVehicleOrder().
bool AIOrder::AreOrderFlagsValid | ( | TileIndex | destination, | |
AIOrderFlags | order_flags | |||
) | [static] |
Checks whether the given order flags are valid for the given destination.
destination | The destination of the order. | |
order_flags | The flags given to the order. |
Definition at line 64 of file ai_order.cpp.
References AIOF_FULL_LOAD_ANY, AIOF_LOAD_FLAGS, AIOF_NO_LOAD, AIOF_NO_UNLOAD, AIOF_NON_STOP_FLAGS, AIOF_SERVICE_IF_NEEDED, AIOF_TRANSFER, AIOF_UNLOAD, AIOF_UNLOAD_FLAGS, and GetOrderTypeByTile().
Referenced by _SetOrderFlags(), AppendOrder(), and InsertOrder().
bool AIOrder::IsValidConditionalOrder | ( | OrderCondition | condition, | |
CompareFunction | compare | |||
) | [static] |
Checks whether the given combination of condition and compare function is valid.
condition | The condition to check. | |
compare | The compare function to check. |
Definition at line 83 of file ai_order.cpp.
References CF_EQUALS, CF_IS_FALSE, CF_IS_TRUE, CF_MORE_EQUALS, OC_AGE, OC_LOAD_PERCENTAGE, OC_MAX_SPEED, OC_RELIABILITY, OC_REQUIRES_SERVICE, and OC_UNCONDITIONALLY.
int32 AIOrder::GetOrderCount | ( | VehicleID | vehicle_id | ) | [static] |
Returns the number of orders for the given vehicle.
vehicle_id | The vehicle to get the order count of. |
Definition at line 102 of file ai_order.cpp.
References AIVehicle::IsValidVehicle().
TileIndex AIOrder::GetOrderDestination | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the destination of the given order for the given vehicle.
vehicle_id | The vehicle to get the destination for. | |
order_position | The order to get the destination for. |
order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position).
Definition at line 107 of file ai_order.cpp.
References INVALID_TILE, IsValidVehicleOrder(), and ORDER_CURRENT.
Referenced by _SetOrderFlags().
AIOrder::AIOrderFlags AIOrder::GetOrderFlags | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the AIOrderFlags of the given order for the given vehicle.
vehicle_id | The vehicle to get the destination for. | |
order_position | The order to get the destination for. |
order_position == ORDER_CURRENT || !IsConditionalOrder(vehicle_id, order_position).
Definition at line 131 of file ai_order.cpp.
References AIOF_INVALID, AIOF_NONE, AIOF_SERVICE_IF_NEEDED, IsValidVehicleOrder(), ODTFB_SERVICE, and ORDER_CURRENT.
Referenced by _SetOrderFlags().
AIOrder::OrderPosition AIOrder::GetOrderJumpTo | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the OrderPosition to jump to if the check succeeds of the given order for the given vehicle.
vehicle_id | The vehicle to get the OrderPosition for. | |
order_position | The order to get the OrderPosition for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 161 of file ai_order.cpp.
References IsConditionalOrder(), IsValidVehicleOrder(), ORDER_CURRENT, and ORDER_INVALID.
AIOrder::OrderCondition AIOrder::GetOrderCondition | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the OrderCondition of the given order for the given vehicle.
vehicle_id | The vehicle to get the condition type for. | |
order_position | The order to get the condition type for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 170 of file ai_order.cpp.
References IsConditionalOrder(), IsValidVehicleOrder(), OC_INVALID, and ORDER_CURRENT.
Referenced by SetOrderCompareValue().
AIOrder::CompareFunction AIOrder::GetOrderCompareFunction | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the CompareFunction of the given order for the given vehicle.
vehicle_id | The vehicle to get the compare function for. | |
order_position | The order to get the compare function for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 179 of file ai_order.cpp.
References CF_INVALID, IsConditionalOrder(), IsValidVehicleOrder(), and ORDER_CURRENT.
int32 AIOrder::GetOrderCompareValue | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Gets the value to compare against of the given order for the given vehicle.
vehicle_id | The vehicle to get the value for. | |
order_position | The order to get the value for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 188 of file ai_order.cpp.
References IsConditionalOrder(), IsValidVehicleOrder(), OCV_MAX_SPEED, and ORDER_CURRENT.
bool AIOrder::SetOrderJumpTo | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
OrderPosition | jump_to | |||
) | [static] |
Sets the OrderPosition to jump to if the check succeeds of the given order for the given vehicle.
vehicle_id | The vehicle to set the OrderPosition for. | |
order_position | The order to set the OrderPosition for. | |
jump_to | The order to jump to if the check succeeds. |
IsValidVehicleOrder(vehicle_id, jump_to).
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 199 of file ai_order.cpp.
References CMD_MODIFY_ORDER, AIObject::DoCommand(), EnforcePrecondition, IsConditionalOrder(), IsValidVehicleOrder(), MOF_COND_DESTINATION, and ORDER_CURRENT.
bool AIOrder::SetOrderCondition | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
OrderCondition | condition | |||
) | [static] |
Sets the OrderCondition of the given order for the given vehicle.
vehicle_id | The vehicle to set the condition type for. | |
order_position | The order to set the condition type for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 208 of file ai_order.cpp.
References CMD_MODIFY_ORDER, AIObject::DoCommand(), EnforcePrecondition, IsConditionalOrder(), IsValidVehicleOrder(), MOF_COND_VARIABLE, OC_LOAD_PERCENTAGE, OC_UNCONDITIONALLY, and ORDER_CURRENT.
bool AIOrder::SetOrderCompareFunction | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
CompareFunction | compare | |||
) | [static] |
Sets the CompareFunction of the given order for the given vehicle.
vehicle_id | The vehicle to set the compare function for. | |
order_position | The order to set the compare function for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
Definition at line 217 of file ai_order.cpp.
References CF_EQUALS, CF_IS_FALSE, CMD_MODIFY_ORDER, AIObject::DoCommand(), EnforcePrecondition, IsConditionalOrder(), IsValidVehicleOrder(), MOF_COND_COMPARATOR, and ORDER_CURRENT.
bool AIOrder::SetOrderCompareValue | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
int32 | value | |||
) | [static] |
Sets the value to compare against of the given order for the given vehicle.
vehicle_id | The vehicle to set the value for. | |
order_position | The order to set the value for. |
order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
value >= 0 && value < 2048.
Definition at line 226 of file ai_order.cpp.
References CMD_MODIFY_ORDER, AIObject::DoCommand(), EnforcePrecondition, GetOrderCondition(), IsConditionalOrder(), IsValidVehicleOrder(), MOF_COND_VALUE, OC_MAX_SPEED, and ORDER_CURRENT.
bool AIOrder::AppendOrder | ( | VehicleID | vehicle_id, | |
TileIndex | destination, | |||
AIOrderFlags | order_flags | |||
) | [static] |
Appends an order to the end of the vehicle's order list.
vehicle_id | The vehicle to append the order to. | |
destination | The destination of the order. | |
order_flags | The flags given to the order. |
AreOrderFlagsValid(destination, order_flags).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY | ||
AIOrder::ERR_ORDER_NO_MORE_SPACE | ||
AIOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION |
Definition at line 236 of file ai_order.cpp.
References AreOrderFlagsValid(), EnforcePrecondition, InsertOrder(), and AIVehicle::IsValidVehicle().
bool AIOrder::AppendConditionalOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | jump_to | |||
) | [static] |
Appends a conditional order to the end of the vehicle's order list.
vehicle_id | The vehicle to append the order to. | |
jump_to | The OrderPosition to jump to if the condition is true. |
IsValidVehicleOrder(vehicle_id, jump_to).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY | ||
AIOrder::ERR_ORDER_NO_MORE_SPACE |
Definition at line 244 of file ai_order.cpp.
References EnforcePrecondition, InsertConditionalOrder(), AIVehicle::IsValidVehicle(), and IsValidVehicleOrder().
bool AIOrder::InsertOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
TileIndex | destination, | |||
AIOrder::AIOrderFlags | order_flags | |||
) | [static] |
Inserts an order before the given order_position into the vehicle's order list.
vehicle_id | The vehicle to add the order to. | |
order_position | The order to place the new order before. | |
destination | The destination of the order. | |
order_flags | The flags given to the order. |
AreOrderFlagsValid(destination, order_flags).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY | ||
AIOrder::ERR_ORDER_NO_MORE_SPACE | ||
AIOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION |
Definition at line 252 of file ai_order.cpp.
References AIOF_SERVICE_IF_NEEDED, AreOrderFlagsValid(), CMD_INSERT_ORDER, AIObject::DoCommand(), EnforcePrecondition, GB(), GetDepotByTile(), GetOrderTypeByTile(), GetStationIndex(), GetWaypointIndex(), AIVehicle::IsValidVehicle(), ODTFB_PART_OF_ORDERS, ODTFB_SERVICE, ORDER_CURRENT, and ResolveOrderPosition().
Referenced by AppendOrder().
bool AIOrder::InsertConditionalOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
OrderPosition | jump_to | |||
) | [static] |
Appends a conditional order before the given order_position into the vehicle's order list.
vehicle_id | The vehicle to add the order to. | |
order_position | The order to place the new order before. | |
jump_to | The OrderPosition to jump to if the condition is true. |
IsValidVehicleOrder(vehicle_id, jump_to).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY | ||
AIOrder::ERR_ORDER_NO_MORE_SPACE |
Definition at line 286 of file ai_order.cpp.
References CMD_INSERT_ORDER, AIObject::DoCommand(), EnforcePrecondition, AIVehicle::IsValidVehicle(), IsValidVehicleOrder(), ORDER_CURRENT, and ResolveOrderPosition().
Referenced by AppendConditionalOrder().
bool AIOrder::RemoveOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position | |||
) | [static] |
Removes an order from the vehicle's order list.
vehicle_id | The vehicle to remove the order from. | |
order_position | The order to remove from the order list. |
AIError::ERR_OWNED_BY_ANOTHER_COMPANY |
Definition at line 300 of file ai_order.cpp.
References CMD_DELETE_ORDER, AIObject::DoCommand(), EnforcePrecondition, IsValidVehicleOrder(), and ResolveOrderPosition().
bool AIOrder::SetOrderFlags | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position, | |||
AIOrder::AIOrderFlags | order_flags | |||
) | [static] |
Changes the order flags of the given order.
vehicle_id | The vehicle to change the order of. | |
order_position | The order to change. | |
order_flags | The new flags given to the order. |
AreOrderFlagsValid(GetOrderDestination(vehicle_id, order_position), order_flags).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY |
Definition at line 374 of file ai_order.cpp.
References _SetOrderFlags().
Referenced by ChangeOrder().
bool AIOrder::MoveOrder | ( | VehicleID | vehicle_id, | |
OrderPosition | order_position_move, | |||
OrderPosition | order_position_target | |||
) | [static] |
Move an order inside the orderlist.
vehicle_id | The vehicle to move the orders. | |
order_position_move | The order to move. | |
order_position_target | The target order |
IsValidVehicleOrder(vehicle_id, order_position_target).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY |
Definition at line 391 of file ai_order.cpp.
References CMD_MOVE_ORDER, AIObject::DoCommand(), EnforcePrecondition, IsValidVehicleOrder(), and ResolveOrderPosition().
Copies the orders from another vehicle.
The orders of the main vehicle are going to be the orders of the changed vehicle.
vehicle_id | The vehicle to copy the orders to. | |
main_vehicle_id | The vehicle to copy the orders from. |
AIVehicle::IsValidVehicle(main_vehicle_id).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY | ||
AIOrder::ERR_ORDER_NO_MORE_SPACE |
Definition at line 402 of file ai_order.cpp.
References CMD_CLONE_ORDER, AIObject::DoCommand(), EnforcePrecondition, and AIVehicle::IsValidVehicle().
Shares the orders between two vehicles.
The orders of the main vehicle are going to be the orders of the changed vehicle.
vehicle_id | The vehicle to add to the shared order list. | |
main_vehicle_id | The vehicle to share the orders with. |
AIVehicle::IsValidVehicle(main_vehicle_id).
AIError::ERR_OWNED_BY_ANOTHER_COMPANY |
Definition at line 410 of file ai_order.cpp.
References CMD_CLONE_ORDER, AIObject::DoCommand(), EnforcePrecondition, and AIVehicle::IsValidVehicle().
bool AIOrder::UnshareOrders | ( | VehicleID | vehicle_id | ) | [static] |
Removes the given vehicle from a shared orders list.
vehicle_id | The vehicle to remove from the shared order list. |
Definition at line 418 of file ai_order.cpp.
References CMD_CLONE_ORDER, AIObject::DoCommand(), EnforcePrecondition, and AIVehicle::IsValidVehicle().