Add setting to increase cost/distance of aircraft linkgraph links

This commit is contained in:
Jonathan G Rennison
2022-01-02 01:15:54 +00:00
parent ba97d0a827
commit 89181ea9fd
15 changed files with 56 additions and 5 deletions

View File

@@ -72,6 +72,7 @@ public:
uint usage; ///< Usage of the link.
Date last_unrestricted_update; ///< When the unrestricted part of the link was last updated.
Date last_restricted_update; ///< When the restricted part of the link was last updated.
Date last_aircraft_update; ///< When aircraft capacity of the link was last updated.
NodeID next_edge; ///< Destination of next valid edge starting at the same source node.
void Init();
};
@@ -117,6 +118,12 @@ public:
*/
Date LastRestrictedUpdate() const { return this->edge.last_restricted_update; }
/**
* Get the date of the last update to the edge's aircraft capacity.
* @return Last update.
*/
Date LastAircraftUpdate() const { return this->edge.last_aircraft_update; }
/**
* Get the date of the last update to any part of the edge's capacity.
* @return Last update.
@@ -307,6 +314,7 @@ public:
void Update(uint capacity, uint usage, EdgeUpdateMode mode);
void Restrict() { this->edge.last_unrestricted_update = INVALID_DATE; }
void Release() { this->edge.last_restricted_update = INVALID_DATE; }
void ClearAircraft() { this->edge.last_aircraft_update = INVALID_DATE; }
};
/**