Enable locking timetable travel times

This commit is contained in:
Jonathan G Rennison
2018-08-13 01:42:14 +01:00
parent 5344ec1931
commit e55a327c09
5 changed files with 51 additions and 6 deletions

View File

@@ -426,10 +426,19 @@ public:
/** Does this order have a fixed wait time? */
inline bool IsWaitFixed() const { return HasBit(this->GetXFlags(), 1); }
/** Set if the wait time is fixed */
/** Set if the wait time is fixed */
inline void SetWaitFixed(bool fixed)
{
if (!this->IsType(OT_CONDITIONAL) && fixed != IsWaitFixed()) SB(this->GetXFlagsRef(), 1, 1, fixed ? 1 : 0);
if (!this->IsType(OT_CONDITIONAL) && fixed != this->IsWaitFixed()) SB(this->GetXFlagsRef(), 1, 1, fixed ? 1 : 0);
}
/** Does this order have a fixed travel time? */
inline bool IsTravelFixed() const { return HasBit(this->GetXFlags(), 4); }
/** Set if the travel time is fixed */
inline void SetTravelFixed(bool fixed)
{
if (!this->IsType(OT_CONDITIONAL) && fixed != IsTravelFixed()) SB(this->GetXFlagsRef(), 4, 1, fixed ? 1 : 0);
}
/** Get the leave type */