OpenTTD Source 20241224-master-gee860a5c8e
TransportedCargoStat< Tstorage > Struct Template Reference

Store the maximum and actually transported cargo amount for the current and the last month. More...

#include <town_type.h>

Public Member Functions

void NewMonth ()
 Update stats for a new month.
 

Data Fields

Tstorage old_max
 Maximum amount last month.
 
Tstorage new_max
 Maximum amount this month.
 
Tstorage old_act
 Actually transported last month.
 
Tstorage new_act
 Actually transported this month.
 

Detailed Description

template<typename Tstorage>
struct TransportedCargoStat< Tstorage >

Store the maximum and actually transported cargo amount for the current and the last month.

Definition at line 113 of file town_type.h.

Constructor & Destructor Documentation

◆ TransportedCargoStat()

template<typename Tstorage >
TransportedCargoStat< Tstorage >::TransportedCargoStat ( )
inline

Definition at line 119 of file town_type.h.

Member Function Documentation

◆ NewMonth()

template<typename Tstorage >
void TransportedCargoStat< Tstorage >::NewMonth ( )
inline

Update stats for a new month.

Definition at line 122 of file town_type.h.

References TransportedCargoStat< Tstorage >::new_act, and TransportedCargoStat< Tstorage >::new_max.

Field Documentation

◆ new_act

template<typename Tstorage >
Tstorage TransportedCargoStat< Tstorage >::new_act

Actually transported this month.

Definition at line 117 of file town_type.h.

Referenced by DeliverGoods(), TownScopeResolver::GetVariable(), TransportedCargoStat< Tstorage >::NewMonth(), and TownGenerateCargo().

◆ new_max

template<typename Tstorage >
Tstorage TransportedCargoStat< Tstorage >::new_max

Maximum amount this month.

Definition at line 115 of file town_type.h.

Referenced by TownScopeResolver::GetVariable(), TransportedCargoStat< Tstorage >::NewMonth(), and TownGenerateCargo().

◆ old_act

template<typename Tstorage >
Tstorage TransportedCargoStat< Tstorage >::old_act

Actually transported last month.

Definition at line 116 of file town_type.h.

Referenced by TownViewWindow::DrawWidget(), TownScopeResolver::GetVariable(), and UpdateTownGrowth().

◆ old_max

template<typename Tstorage >
Tstorage TransportedCargoStat< Tstorage >::old_max

Maximum amount last month.

Definition at line 114 of file town_type.h.

Referenced by TownViewWindow::DrawWidget(), TownScopeResolver::GetVariable(), and UpdateTownMaxPass().


The documentation for this struct was generated from the following file: