MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DecloneOrder

Function DecloneOrder

src/order_cmd.cpp:917–925  ·  view source on GitHub ↗

* Declone an order-list * @param *dst delete the orders of this vehicle * @param flags execution flags */

Source from the content-addressed store, hash-verified

915 * @param flags execution flags
916 */
917static CommandCost DecloneOrder(Vehicle *dst, DoCommandFlags flags)
918{
919 if (flags.Test(DoCommandFlag::Execute)) {
920 DeleteVehicleOrders(dst);
921 InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
922 InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
923 }
924 return CommandCost();
925}
926
927/**
928 * Delete an order from the orderlist of a vehicle.

Callers 2

CmdDeleteOrderFunction · 0.85
CmdCloneOrderFunction · 0.85

Calls 6

DeleteVehicleOrdersFunction · 0.85
InvalidateVehicleOrderFunction · 0.85
CommandCostClass · 0.85
TestMethod · 0.80

Tested by

no test coverage detected