Import more conditional orders patch

http://www.tt-forums.net/viewtopic.php?p=1033223#p1033223
This commit is contained in:
patch-import
2015-08-26 22:19:35 +01:00
committed by Jonathan G Rennison
parent 789266146f
commit c757a97214
10 changed files with 327 additions and 14 deletions

View File

@@ -44,6 +44,8 @@ private:
CargoID refit_cargo; ///< Refit CargoID
byte refit_subtype; ///< Refit subtype
int8 jump_counter; ///< Counter for the 'jump xx% of times' option
public:
Order *next; ///< Pointer to next order. If NULL, end of list
@@ -133,6 +135,14 @@ public:
void SetRefit(CargoID cargo, byte subtype = 0);
/**
* Update the jump_counter of this order.
* @param the jump chance in %.
* @return whether to jump or not.
* @pre IsType(OT_CONDITIONAL) && this->GetConditionVariable() == OCV_PERCENT.
*/
bool UpdateJumpCounter(uint8 percent);
/** How must the consist be loaded? */
inline OrderLoadFlags GetLoadType() const { return (OrderLoadFlags)GB(this->flags, 4, 4); }
/** How must the consist be unloaded? */