* Declone an order-list * @param *dst delete the orders of this vehicle * @param flags execution flags */
| 915 | * @param flags execution flags |
| 916 | */ |
| 917 | static 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. |
no test coverage detected