src/order_base.h
changeset 10081 e46b9eb2f9c1
parent 10079 99aba130db3c
child 10084 95e428ae219c
equal deleted inserted replaced
10080:e0a9b92ed875 10081:e46b9eb2f9c1
   159 	 * @pre IsType(OT_GOTO_DEPOT).
   159 	 * @pre IsType(OT_GOTO_DEPOT).
   160 	 */
   160 	 */
   161 	void SetRefit(CargoID cargo, byte subtype = 0);
   161 	void SetRefit(CargoID cargo, byte subtype = 0);
   162 
   162 
   163 	/** How must the consist be loaded? */
   163 	/** How must the consist be loaded? */
   164 	inline byte GetLoadType() const { return this->flags & OFB_FULL_LOAD; }
   164 	inline OrderLoadFlags GetLoadType() const { return (OrderLoadFlags)(this->flags & OLFB_FULL_LOAD); }
   165 	/** How must the consist be unloaded? */
   165 	/** How must the consist be unloaded? */
   166 	inline byte GetUnloadType() const { return GB(this->flags, 0, 2); }
   166 	inline OrderUnloadFlags GetUnloadType() const { return (OrderUnloadFlags)GB(this->flags, 0, 2); }
   167 	/** Where must we stop? */
   167 	/** Where must we stop? */
   168 	OrderNonStopFlags GetNonStopType() const;
   168 	OrderNonStopFlags GetNonStopType() const;
   169 	/** What caused us going to the depot? */
   169 	/** What caused us going to the depot? */
   170 	inline OrderDepotTypeFlags GetDepotOrderType() const { return (OrderDepotTypeFlags)this->flags; }
   170 	inline OrderDepotTypeFlags GetDepotOrderType() const { return (OrderDepotTypeFlags)this->flags; }
   171 	/** What are we going to do when in the depot. */
   171 	/** What are we going to do when in the depot. */
   172 	inline OrderDepotActionFlags GetDepotActionType() const { return (OrderDepotActionFlags)this->flags; }
   172 	inline OrderDepotActionFlags GetDepotActionType() const { return (OrderDepotActionFlags)this->flags; }
   173 
   173 
   174 	/** Set how the consist must be loaded. */
   174 	/** Set how the consist must be loaded. */
   175 	inline void SetLoadType(byte load_type) { SB(this->flags, 2, 1, !!load_type); }
   175 	inline void SetLoadType(OrderLoadFlags load_type) { SB(this->flags, 2, 1, !!load_type); }
   176 	/** Set how the consist must be unloaded. */
   176 	/** Set how the consist must be unloaded. */
   177 	inline void SetUnloadType(byte unload_type) { SB(this->flags, 0, 2, unload_type); }
   177 	inline void SetUnloadType(OrderUnloadFlags unload_type) { SB(this->flags, 0, 2, unload_type); }
   178 	/** Set whether we must stop at stations or not. */
   178 	/** Set whether we must stop at stations or not. */
   179 	inline void SetNonStopType(OrderNonStopFlags non_stop_type) { SB(this->flags, 3, 1, !!non_stop_type); }
   179 	inline void SetNonStopType(OrderNonStopFlags non_stop_type) { SB(this->flags, 3, 1, !!non_stop_type); }
   180 	/** Set the cause to go to the depot. */
   180 	/** Set the cause to go to the depot. */
   181 	inline void SetDepotOrderType(OrderDepotTypeFlags depot_order_type) { this->flags = depot_order_type; }
   181 	inline void SetDepotOrderType(OrderDepotTypeFlags depot_order_type) { this->flags = depot_order_type; }
   182 	/** Set what we are going to do in the depot. */
   182 	/** Set what we are going to do in the depot. */