OpenTTD Source: TransportedCargoStat< Tstorage > Struct Template Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
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 = 0
| Maximum amount last month.
Tstorage | new_max = 0
| Maximum amount this month.
Tstorage | old_act = 0
| Actually transported last month.
Tstorage | new_act = 0
| 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 123 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 130 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 = 0

Actually transported this month.

Definition at line 127 of file town_type.h.

Referenced by TransportedCargoStat< Tstorage >::NewMonth().

## ◆ new_max

template<typename Tstorage >

Tstorage TransportedCargoStat< Tstorage >::new_max = 0

Maximum amount this month.

Definition at line 125 of file town_type.h.

Referenced by TransportedCargoStat< Tstorage >::NewMonth().

## ◆ old_act

template<typename Tstorage >

Tstorage TransportedCargoStat< Tstorage >::old_act = 0

Actually transported last month.

Definition at line 126 of file town_type.h.

## ◆ old_max

template<typename Tstorage >

Tstorage TransportedCargoStat< Tstorage >::old_max = 0

Maximum amount last month.

Definition at line 124 of file town_type.h.

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

- src/town_type.h