|
@@ -39,13 +39,12 @@ private:
|
|
|
|
|
|
uint8 type; ///< The type of order + non-stop flags
|
|
|
uint8 flags; ///< Load/unload types, depot order/action types.
|
|
|
DestinationID dest; ///< The destination of the order.
|
|
|
|
|
|
CargoID refit_cargo; ///< Refit CargoID
|
|
|
byte refit_subtype; ///< Refit subtype
|
|
|
|
|
|
public:
|
|
|
Order *next; ///< Pointer to next order. If NULL, end of list
|
|
|
|
|
|
uint16 wait_time; ///< How long in ticks to wait at the destination.
|
|
|
uint16 travel_time; ///< How long in ticks the journey to this destination should take.
|
|
@@ -69,13 +68,13 @@ public:
|
|
|
*/
|
|
|
inline OrderType GetType() const { return (OrderType)GB(this->type, 0, 4); }
|
|
|
|
|
|
void Free();
|
|
|
|
|
|
void MakeGoToStation(StationID destination);
|
|
|
void MakeGoToDepot(DepotID destination, OrderDepotTypeFlags order, OrderNonStopFlags non_stop_type = ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS, OrderDepotActionFlags action = ODATF_SERVICE_ONLY, CargoID cargo = CT_NO_REFIT, byte subtype = 0);
|
|
|
void MakeGoToDepot(DepotID destination, OrderDepotTypeFlags order, OrderNonStopFlags non_stop_type = ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS, OrderDepotActionFlags action = ODATF_SERVICE_ONLY, CargoID cargo = CT_NO_REFIT);
|
|
|
void MakeGoToWaypoint(StationID destination);
|
|
|
void MakeLoading(bool ordered);
|
|
|
void MakeLeaveStation();
|
|
|
void MakeDummy();
|
|
|
void MakeConditional(VehicleOrderID order);
|
|
|
void MakeImplicit(StationID destination);
|
|
@@ -121,20 +120,13 @@ public:
|
|
|
* Get the cargo to to refit to.
|
|
|
* @pre IsType(OT_GOTO_DEPOT) || IsType(OT_GOTO_STATION)
|
|
|
* @return the cargo type.
|
|
|
*/
|
|
|
inline CargoID GetRefitCargo() const { return this->refit_cargo; }
|
|
|
|
|
|
/**
|
|
|
* Get the cargo subtype to to refit to.
|
|
|
* @pre IsType(OT_GOTO_DEPOT) || IsType(OT_GOTO_STATION)
|
|
|
* @return the cargo subtype.
|
|
|
*/
|
|
|
inline byte GetRefitSubtype() const { return this->refit_subtype; }
|
|
|
|
|
|
void SetRefit(CargoID cargo, byte subtype = 0);
|
|
|
void SetRefit(CargoID cargo);
|
|
|
|
|
|
/** How must the consist be loaded? */
|
|
|
inline OrderLoadFlags GetLoadType() const { return (OrderLoadFlags)GB(this->flags, 4, 4); }
|
|
|
/** How must the consist be unloaded? */
|
|
|
inline OrderUnloadFlags GetUnloadType() const { return (OrderUnloadFlags)GB(this->flags, 0, 4); }
|
|
|
/** At which stations must we stop? */
|