equal
deleted
inserted
replaced
544 } |
544 } |
545 cur_order_id++; |
545 cur_order_id++; |
546 } |
546 } |
547 |
547 |
548 /* Make sure to rebuild the whole list */ |
548 /* Make sure to rebuild the whole list */ |
549 RebuildVehicleLists(); |
549 InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); |
550 } |
550 } |
551 |
551 |
552 return CommandCost(); |
552 return CommandCost(); |
553 } |
553 } |
554 |
554 |
559 static CommandCost DecloneOrder(Vehicle *dst, uint32 flags) |
559 static CommandCost DecloneOrder(Vehicle *dst, uint32 flags) |
560 { |
560 { |
561 if (flags & DC_EXEC) { |
561 if (flags & DC_EXEC) { |
562 DeleteVehicleOrders(dst); |
562 DeleteVehicleOrders(dst); |
563 InvalidateVehicleOrder(dst); |
563 InvalidateVehicleOrder(dst); |
564 RebuildVehicleLists(); |
564 InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); |
565 } |
565 } |
566 return CommandCost(); |
566 return CommandCost(); |
567 } |
567 } |
568 |
568 |
569 /** |
569 /** |
671 } |
671 } |
672 } |
672 } |
673 cur_order_id++; |
673 cur_order_id++; |
674 } |
674 } |
675 |
675 |
676 RebuildVehicleLists(); |
676 InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); |
677 } |
677 } |
678 |
678 |
679 return CommandCost(); |
679 return CommandCost(); |
680 } |
680 } |
681 |
681 |
809 order->SetConditionSkipToOrder(order_id); |
809 order->SetConditionSkipToOrder(order_id); |
810 } |
810 } |
811 } |
811 } |
812 |
812 |
813 /* Make sure to rebuild the whole list */ |
813 /* Make sure to rebuild the whole list */ |
814 RebuildVehicleLists(); |
814 InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); |
815 } |
815 } |
816 |
816 |
817 return CommandCost(); |
817 return CommandCost(); |
818 } |
818 } |
819 |
819 |
1073 src->next_shared = dst; |
1073 src->next_shared = dst; |
1074 |
1074 |
1075 InvalidateVehicleOrder(dst); |
1075 InvalidateVehicleOrder(dst); |
1076 InvalidateVehicleOrder(src); |
1076 InvalidateVehicleOrder(src); |
1077 |
1077 |
1078 RebuildVehicleLists(); |
1078 InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); |
1079 } |
1079 } |
1080 } break; |
1080 } break; |
1081 |
1081 |
1082 case CO_COPY: { |
1082 case CO_COPY: { |
1083 Vehicle *src; |
1083 Vehicle *src; |
1132 |
1132 |
1133 dst->num_orders = src->num_orders; |
1133 dst->num_orders = src->num_orders; |
1134 |
1134 |
1135 InvalidateVehicleOrder(dst); |
1135 InvalidateVehicleOrder(dst); |
1136 |
1136 |
1137 RebuildVehicleLists(); |
1137 InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); |
1138 } |
1138 } |
1139 } break; |
1139 } break; |
1140 |
1140 |
1141 case CO_UNSHARE: return DecloneOrder(dst, flags); |
1141 case CO_UNSHARE: return DecloneOrder(dst, flags); |
1142 default: return CMD_ERROR; |
1142 default: return CMD_ERROR; |