src/order_base.h
changeset 8848 635cb164edd4
parent 8845 f9ef3bb70e47
child 8853 3266f0374302
equal deleted inserted replaced
8847:426dd2d582e7 8848:635cb164edd4
   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 byte GetLoadType() const { return this->flags & OFB_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 byte GetUnloadType() const { return GB(this->flags, 0, 2); }
   167 	/** Where must we stop? */
   167 	/** Where must we stop? */
   168 	inline byte GetNonStopType() const { return this->flags & OFB_NON_STOP; }
   168 	OrderNonStopFlags GetNonStopType() const;
   169 	/** What caused us going to the depot? */
   169 	/** What caused us going to the depot? */
   170 	inline byte GetDepotOrderType() const { return this->flags; }
   170 	inline byte GetDepotOrderType() const { return 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 byte GetDepotActionType() const { return this->flags; }
   172 	inline byte GetDepotActionType() const { return 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(byte 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(byte 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(byte 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(byte depot_order_type) { this->flags = depot_order_type; }
   181 	inline void SetDepotOrderType(byte 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. */
   183 	inline void SetDepotActionType(byte depot_service_type) { this->flags = depot_service_type; }
   183 	inline void SetDepotActionType(byte depot_service_type) { this->flags = depot_service_type; }
   184 
   184