equal
deleted
inserted
replaced
439 |
439 |
440 /* Make sure to rebuild the whole list */ |
440 /* Make sure to rebuild the whole list */ |
441 RebuildVehicleLists(); |
441 RebuildVehicleLists(); |
442 } |
442 } |
443 |
443 |
444 return 0; |
444 return CommandCost(); |
445 } |
445 } |
446 |
446 |
447 /** Declone an order-list |
447 /** Declone an order-list |
448 * @param *dst delete the orders of this vehicle |
448 * @param *dst delete the orders of this vehicle |
449 * @param flags execution flags |
449 * @param flags execution flags |
453 if (flags & DC_EXEC) { |
453 if (flags & DC_EXEC) { |
454 DeleteVehicleOrders(dst); |
454 DeleteVehicleOrders(dst); |
455 InvalidateVehicleOrder(dst); |
455 InvalidateVehicleOrder(dst); |
456 RebuildVehicleLists(); |
456 RebuildVehicleLists(); |
457 } |
457 } |
458 return 0; |
458 return CommandCost(); |
459 } |
459 } |
460 |
460 |
461 /** |
461 /** |
462 * Remove the VehicleList that shows all the vehicles with the same shared |
462 * Remove the VehicleList that shows all the vehicles with the same shared |
463 * orders. |
463 * orders. |
552 } |
552 } |
553 |
553 |
554 RebuildVehicleLists(); |
554 RebuildVehicleLists(); |
555 } |
555 } |
556 |
556 |
557 return 0; |
557 return CommandCost(); |
558 } |
558 } |
559 |
559 |
560 /** Goto order of order-list. |
560 /** Goto order of order-list. |
561 * @param tile unused |
561 * @param tile unused |
562 * @param flags operation to perform |
562 * @param flags operation to perform |
593 |
593 |
594 /* We have an aircraft/ship, they have a mini-schedule, so update them all */ |
594 /* We have an aircraft/ship, they have a mini-schedule, so update them all */ |
595 if (v->type == VEH_AIRCRAFT) InvalidateWindowClasses(WC_AIRCRAFT_LIST); |
595 if (v->type == VEH_AIRCRAFT) InvalidateWindowClasses(WC_AIRCRAFT_LIST); |
596 if (v->type == VEH_SHIP) InvalidateWindowClasses(WC_SHIPS_LIST); |
596 if (v->type == VEH_SHIP) InvalidateWindowClasses(WC_SHIPS_LIST); |
597 |
597 |
598 return 0; |
598 return CommandCost(); |
599 } |
599 } |
600 |
600 |
601 /** |
601 /** |
602 * Move an order inside the orderlist |
602 * Move an order inside the orderlist |
603 * @param tile unused |
603 * @param tile unused |
679 |
679 |
680 /* Make sure to rebuild the whole list */ |
680 /* Make sure to rebuild the whole list */ |
681 RebuildVehicleLists(); |
681 RebuildVehicleLists(); |
682 } |
682 } |
683 |
683 |
684 return 0; |
684 return CommandCost(); |
685 } |
685 } |
686 |
686 |
687 /** Modify an order in the orderlist of a vehicle. |
687 /** Modify an order in the orderlist of a vehicle. |
688 * @param tile unused |
688 * @param tile unused |
689 * @param flags operation to perform |
689 * @param flags operation to perform |
761 InvalidateVehicleOrder(u); |
761 InvalidateVehicleOrder(u); |
762 } |
762 } |
763 } |
763 } |
764 } |
764 } |
765 |
765 |
766 return 0; |
766 return CommandCost(); |
767 } |
767 } |
768 |
768 |
769 /** Clone/share/copy an order-list of an other vehicle. |
769 /** Clone/share/copy an order-list of an other vehicle. |
770 * @param tile unused |
770 * @param tile unused |
771 * @param flags operation to perform |
771 * @param flags operation to perform |
894 |
894 |
895 case CO_UNSHARE: return DecloneOrder(dst, flags); |
895 case CO_UNSHARE: return DecloneOrder(dst, flags); |
896 default: return CMD_ERROR; |
896 default: return CMD_ERROR; |
897 } |
897 } |
898 |
898 |
899 return 0; |
899 return CommandCost(); |
900 } |
900 } |
901 |
901 |
902 /** Add/remove refit orders from an order |
902 /** Add/remove refit orders from an order |
903 * @param tile Not used |
903 * @param tile Not used |
904 * @param flags operation to perform |
904 * @param flags operation to perform |
943 u->current_order.refit_subtype = subtype; |
943 u->current_order.refit_subtype = subtype; |
944 } |
944 } |
945 } |
945 } |
946 } |
946 } |
947 |
947 |
948 return 0; |
948 return CommandCost(); |
949 } |
949 } |
950 |
950 |
951 /** |
951 /** |
952 * |
952 * |
953 * Backup a vehicle order-list, so you can replace a vehicle |
953 * Backup a vehicle order-list, so you can replace a vehicle |
1056 if (flags & DC_EXEC) { |
1056 if (flags & DC_EXEC) { |
1057 v->cur_order_index = cur_ord; |
1057 v->cur_order_index = cur_ord; |
1058 v->service_interval = serv_int; |
1058 v->service_interval = serv_int; |
1059 } |
1059 } |
1060 |
1060 |
1061 return 0; |
1061 return CommandCost(); |
1062 } |
1062 } |
1063 |
1063 |
1064 |
1064 |
1065 static TileIndex GetStationTileForVehicle(const Vehicle* v, const Station* st) |
1065 static TileIndex GetStationTileForVehicle(const Vehicle* v, const Station* st) |
1066 { |
1066 { |