equal
deleted
inserted
replaced
180 } |
180 } |
181 |
181 |
182 |
182 |
183 /** Add an order to the orderlist of a vehicle. |
183 /** Add an order to the orderlist of a vehicle. |
184 * @param tile unused |
184 * @param tile unused |
|
185 * @param flags operation to perform |
185 * @param p1 various bitstuffed elements |
186 * @param p1 various bitstuffed elements |
186 * - p1 = (bit 0 - 15) - ID of the vehicle |
187 * - p1 = (bit 0 - 15) - ID of the vehicle |
187 * - p1 = (bit 16 - 31) - the selected order (if any). If the last order is given, |
188 * - p1 = (bit 16 - 31) - the selected order (if any). If the last order is given, |
188 * the order will be inserted before that one |
189 * the order will be inserted before that one |
189 * only the first 8 bits used currently (bit 16 - 23) (max 255) |
190 * only the first 8 bits used currently (bit 16 - 23) (max 255) |
476 DeleteWindowById(window_class, (v->orders->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner); |
477 DeleteWindowById(window_class, (v->orders->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner); |
477 } |
478 } |
478 |
479 |
479 /** Delete an order from the orderlist of a vehicle. |
480 /** Delete an order from the orderlist of a vehicle. |
480 * @param tile unused |
481 * @param tile unused |
|
482 * @param flags operation to perform |
481 * @param p1 the ID of the vehicle |
483 * @param p1 the ID of the vehicle |
482 * @param p2 the order to delete (max 255) |
484 * @param p2 the order to delete (max 255) |
483 */ |
485 */ |
484 int32 CmdDeleteOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
486 int32 CmdDeleteOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
485 { |
487 { |
555 return 0; |
557 return 0; |
556 } |
558 } |
557 |
559 |
558 /** Goto next order of order-list. |
560 /** Goto next order of order-list. |
559 * @param tile unused |
561 * @param tile unused |
|
562 * @param flags operation to perform |
560 * @param p1 The ID of the vehicle which order is skipped |
563 * @param p1 The ID of the vehicle which order is skipped |
561 * @param p2 unused |
564 * @param p2 unused |
562 */ |
565 */ |
563 int32 CmdSkipOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
566 int32 CmdSkipOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
564 { |
567 { |
598 } |
601 } |
599 |
602 |
600 |
603 |
601 /** Modify an order in the orderlist of a vehicle. |
604 /** Modify an order in the orderlist of a vehicle. |
602 * @param tile unused |
605 * @param tile unused |
|
606 * @param flags operation to perform |
603 * @param p1 various bitstuffed elements |
607 * @param p1 various bitstuffed elements |
604 * - p1 = (bit 0 - 15) - ID of the vehicle |
608 * - p1 = (bit 0 - 15) - ID of the vehicle |
605 * - p1 = (bit 16 - 31) - the selected order (if any). If the last order is given, |
609 * - p1 = (bit 16 - 31) - the selected order (if any). If the last order is given, |
606 * the order will be inserted before that one |
610 * the order will be inserted before that one |
607 * only the first 8 bits used currently (bit 16 - 23) (max 255) |
611 * only the first 8 bits used currently (bit 16 - 23) (max 255) |
678 |
682 |
679 return 0; |
683 return 0; |
680 } |
684 } |
681 |
685 |
682 /** Clone/share/copy an order-list of an other vehicle. |
686 /** Clone/share/copy an order-list of an other vehicle. |
|
687 * @param tile unused |
|
688 * @param flags operation to perform |
683 * @param p1 various bitstuffed elements |
689 * @param p1 various bitstuffed elements |
684 * - p1 = (bit 0-15) - destination vehicle to clone orders to (p1 & 0xFFFF) |
690 * - p1 = (bit 0-15) - destination vehicle to clone orders to (p1 & 0xFFFF) |
685 * - p1 = (bit 16-31) - source vehicle to clone orders from, if any (none for CO_UNSHARE) |
691 * - p1 = (bit 16-31) - source vehicle to clone orders from, if any (none for CO_UNSHARE) |
686 * @param p2 mode of cloning: CO_SHARE, CO_COPY, or CO_UNSHARE |
692 * @param p2 mode of cloning: CO_SHARE, CO_COPY, or CO_UNSHARE |
687 */ |
693 */ |
810 return 0; |
816 return 0; |
811 } |
817 } |
812 |
818 |
813 /** Add/remove refit orders from an order |
819 /** Add/remove refit orders from an order |
814 * @param tile Not used |
820 * @param tile Not used |
|
821 * @param flags operation to perform |
815 * @param p1 VehicleIndex of the vehicle having the order |
822 * @param p1 VehicleIndex of the vehicle having the order |
816 * @param p2 bitmask |
823 * @param p2 bitmask |
817 * - bit 0-7 CargoID |
824 * - bit 0-7 CargoID |
818 * - bit 8-15 Cargo subtype |
825 * - bit 8-15 Cargo subtype |
819 * - bit 16-23 number of order to modify |
826 * - bit 16-23 number of order to modify |
935 DoCommandP(0, v->index, bak->orderindex | (bak->service_interval << 16) , NULL, CMD_RESTORE_ORDER_INDEX); |
942 DoCommandP(0, v->index, bak->orderindex | (bak->service_interval << 16) , NULL, CMD_RESTORE_ORDER_INDEX); |
936 } |
943 } |
937 |
944 |
938 /** Restore the current order-index of a vehicle and sets service-interval. |
945 /** Restore the current order-index of a vehicle and sets service-interval. |
939 * @param tile unused |
946 * @param tile unused |
|
947 * @param flags operation to perform |
940 * @param p1 the ID of the vehicle |
948 * @param p1 the ID of the vehicle |
941 * @param p2 various bistuffed elements |
949 * @param p2 various bistuffed elements |
942 * - p2 = (bit 0-15) - current order-index (p2 & 0xFFFF) |
950 * - p2 = (bit 0-15) - current order-index (p2 & 0xFFFF) |
943 * - p2 = (bit 16-31) - service interval (p2 >> 16) |
951 * - p2 = (bit 16-31) - service interval (p2 >> 16) |
944 * @todo Unfortunately you cannot safely restore the unitnumber or the old vehicle |
952 * @todo Unfortunately you cannot safely restore the unitnumber or the old vehicle |