Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
This commit is contained in:
@@ -290,7 +290,7 @@ public:
|
||||
static constexpr DateDelta STALE_LINK_DEPOT_TIMEOUT = 1024;
|
||||
|
||||
/** Minimum number of ticks between subsequent compressions of a LG. */
|
||||
static constexpr DateTicksScaledDelta COMPRESSION_INTERVAL = 256 * DAY_TICKS;
|
||||
static constexpr StateTicksDelta COMPRESSION_INTERVAL = 256 * DAY_TICKS;
|
||||
|
||||
/**
|
||||
* Scale a value from a link graph of age orig_age for usage in one of age
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
* Real constructor.
|
||||
* @param cargo Cargo the link graph is about.
|
||||
*/
|
||||
LinkGraph(CargoID cargo) : cargo(cargo), last_compression(_scaled_date_ticks) {}
|
||||
LinkGraph(CargoID cargo) : cargo(cargo), last_compression(_state_ticks) {}
|
||||
|
||||
void Init(uint size);
|
||||
void ShiftDates(DateDelta interval);
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
* Get date of last compression.
|
||||
* @return Date of last compression.
|
||||
*/
|
||||
inline DateTicksScaled LastCompression() const { return this->last_compression; }
|
||||
inline StateTicks LastCompression() const { return this->last_compression; }
|
||||
|
||||
/**
|
||||
* Get the cargo ID this component's link graph refers to.
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
*/
|
||||
inline uint Monthly(uint base) const
|
||||
{
|
||||
return (uint)((static_cast<uint64_t>(base) * 30 * DAY_TICKS * _settings_game.economy.day_length_factor) / std::max<uint64_t>((_scaled_date_ticks - this->last_compression).base(), DAY_TICKS));
|
||||
return (uint)((static_cast<uint64_t>(base) * 30 * DAY_TICKS * _settings_game.economy.day_length_factor) / std::max<uint64_t>((_state_ticks - this->last_compression).base(), DAY_TICKS));
|
||||
}
|
||||
|
||||
NodeID AddNode(const Station *st);
|
||||
@@ -392,11 +392,11 @@ protected:
|
||||
friend upstream_sl::SlLinkgraphNode;
|
||||
friend upstream_sl::SlLinkgraphEdge;
|
||||
|
||||
friend void AdjustLinkGraphScaledTickBase(DateTicksScaledDelta delta);
|
||||
friend void AdjustLinkGraphStateTicksBase(StateTicksDelta delta);
|
||||
friend void LinkGraphFixupLastCompressionAfterLoad();
|
||||
|
||||
CargoID cargo; ///< Cargo of this component's link graph.
|
||||
DateTicksScaled last_compression; ///< Last time the capacities and supplies were compressed.
|
||||
StateTicks last_compression; ///< Last time the capacities and supplies were compressed.
|
||||
NodeVector nodes; ///< Nodes in the component.
|
||||
EdgeMatrix edges; ///< Edges in the component.
|
||||
|
||||
|
Reference in New Issue
Block a user