|
|
|
@ -915,7 +915,7 @@ static CommandCost DecloneOrder(Vehicle *dst, DoCommandFlag flags)
|
|
|
|
|
{
|
|
|
|
|
if (flags & DC_EXEC) {
|
|
|
|
|
DeleteVehicleOrders(dst);
|
|
|
|
|
InvalidateVehicleOrder(dst, -1);
|
|
|
|
|
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
|
|
|
|
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
|
|
|
|
}
|
|
|
|
|
return CommandCost();
|
|
|
|
@ -1054,7 +1054,7 @@ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|
|
|
|
|
|
|
|
|
if (v->current_order.IsType(OT_LOADING)) v->LeaveStation();
|
|
|
|
|
|
|
|
|
|
InvalidateVehicleOrder(v, -2);
|
|
|
|
|
InvalidateVehicleOrder(v, VIWD_MODIFY_ORDERS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* We have an aircraft/ship, they have a mini-schedule, so update them all */
|
|
|
|
@ -1393,7 +1393,7 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|
|
|
|
u->current_order.GetLoadType() != order->GetLoadType()) {
|
|
|
|
|
u->current_order.SetLoadType(order->GetLoadType());
|
|
|
|
|
}
|
|
|
|
|
InvalidateVehicleOrder(u, -2);
|
|
|
|
|
InvalidateVehicleOrder(u, VIWD_MODIFY_ORDERS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1503,8 +1503,8 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|
|
|
|
/* Link this vehicle in the shared-list */
|
|
|
|
|
dst->AddToShared(src);
|
|
|
|
|
|
|
|
|
|
InvalidateVehicleOrder(dst, -1);
|
|
|
|
|
InvalidateVehicleOrder(src, -2);
|
|
|
|
|
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
|
|
|
|
InvalidateVehicleOrder(src, VIWD_MODIFY_ORDERS);
|
|
|
|
|
|
|
|
|
|
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
|
|
|
|
}
|
|
|
|
@ -1566,7 +1566,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|
|
|
|
dst->orders.list = new OrderList(first, dst);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InvalidateVehicleOrder(dst, -1);
|
|
|
|
|
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
|
|
|
|
|
|
|
|
|
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
|
|
|
|
}
|
|
|
|
@ -1624,7 +1624,7 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|
|
|
|
|
|
|
|
|
for (Vehicle *u = v->FirstShared(); u != NULL; u = u->NextShared()) {
|
|
|
|
|
/* Update any possible open window of the vehicle */
|
|
|
|
|
InvalidateVehicleOrder(u, -2);
|
|
|
|
|
InvalidateVehicleOrder(u, VIWD_MODIFY_ORDERS);
|
|
|
|
|
|
|
|
|
|
/* If the vehicle already got the current depot set as current order, then update current order as well */
|
|
|
|
|
if (u->cur_real_order_index == order_number && (u->current_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS)) {
|
|
|
|
@ -2093,7 +2093,7 @@ bool ProcessOrders(Vehicle *v)
|
|
|
|
|
/* Otherwise set it, and determine the destination tile. */
|
|
|
|
|
v->current_order = *order;
|
|
|
|
|
|
|
|
|
|
InvalidateVehicleOrder(v, -2);
|
|
|
|
|
InvalidateVehicleOrder(v, VIWD_MODIFY_ORDERS);
|
|
|
|
|
switch (v->type) {
|
|
|
|
|
default:
|
|
|
|
|
NOT_REACHED();
|
|
|
|
|