equal
deleted
inserted
replaced
84 }; |
84 }; |
85 |
85 |
86 /* If you change this, keep in mind that it is saved on 3 places: |
86 /* If you change this, keep in mind that it is saved on 3 places: |
87 * - Load_ORDR, all the global orders |
87 * - Load_ORDR, all the global orders |
88 * - Vehicle -> current_order |
88 * - Vehicle -> current_order |
89 * - REF_SHEDULE (all REFs are currently limited to 16 bits!!) |
89 * - REF_ORDER (all REFs are currently limited to 16 bits!!) |
90 */ |
90 */ |
91 struct Order { |
91 struct Order { |
92 Order *next; ///< Pointer to next order. If NULL, end of list |
92 Order *next; ///< Pointer to next order. If NULL, end of list |
93 |
93 |
94 OrderTypeByte type; |
94 OrderTypeByte type; |
97 |
97 |
98 OrderID index; ///< Index of the order, is not saved or anything, just for reference |
98 OrderID index; ///< Index of the order, is not saved or anything, just for reference |
99 |
99 |
100 CargoID refit_cargo; // Refit CargoID |
100 CargoID refit_cargo; // Refit CargoID |
101 byte refit_subtype; // Refit subtype |
101 byte refit_subtype; // Refit subtype |
|
102 |
|
103 uint16 wait_time; ///< How long in ticks to wait at the destination. |
|
104 uint16 travel_time; ///< How long in ticks the journey to this destination should take. |
102 |
105 |
103 bool IsValid() const; |
106 bool IsValid() const; |
104 void Free(); |
107 void Free(); |
105 void FreeChain(); |
108 void FreeChain(); |
106 }; |
109 }; |
195 order.dest = GB(packed, 16, 16); |
198 order.dest = GB(packed, 16, 16); |
196 order.next = NULL; |
199 order.next = NULL; |
197 order.index = 0; // avoid compiler warning |
200 order.index = 0; // avoid compiler warning |
198 order.refit_cargo = CT_NO_REFIT; |
201 order.refit_cargo = CT_NO_REFIT; |
199 order.refit_subtype = 0; |
202 order.refit_subtype = 0; |
|
203 order.wait_time = 0; |
|
204 order.travel_time = 0; |
200 return order; |
205 return order; |
201 } |
206 } |
202 |
207 |
203 /* Functions */ |
208 /* Functions */ |
204 void BackupVehicleOrders(const Vehicle *v, BackuppedOrders *order); |
209 void BackupVehicleOrders(const Vehicle *v, BackuppedOrders *order); |