OpenTTD Source: Industry::AcceptedCargo Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
Industry::AcceptedCargo Struct Reference

## Public Member Functions
HistoryData< AcceptedHistory > & | GetOrCreateHistory ()
| Get history data, creating it if necessary.

## Data Fields
CargoType | cargo = 0
| Cargo type.
uint16_t | waiting = 0
| Amount of cargo waiting to processed.
uint32_t | accumulated_waiting = 0
| Accumulated waiting total over the last month, used to calculate average.
TimerGameEconomy::Date | last_accepted {}
| Last day cargo was accepted by this industry.
std::unique_ptr< HistoryData< AcceptedHistory > > | history {}
| History of accepted and waiting cargo.

## Detailed Description

Definition at line 85 of file industry.h.

## Member Function Documentation

## ◆ GetOrCreateHistory()

HistoryData< AcceptedHistory > & Industry::AcceptedCargo::GetOrCreateHistory | ( |  | ) |
| inline

Get history data, creating it if necessary.

Returns
  Accepted history data.

Definition at line 96 of file industry.h.

References history.

## Field Documentation

## ◆ accumulated_waiting

uint32_t Industry::AcceptedCargo::accumulated_waiting = 0

Accumulated waiting total over the last month, used to calculate average.

Definition at line 88 of file industry.h.

## ◆ cargo

CargoType Industry::AcceptedCargo::cargo = 0

Cargo type.

Definition at line 86 of file industry.h.

Referenced by DoCreateNewIndustry(), Industry::GetCargoAccepted(), Industry::GetCargoAccepted(), and IndustriesScopeResolver::GetVariable().

## ◆ history

std::unique_ptr<HistoryData<AcceptedHistory> > Industry::AcceptedCargo::history {}

History of accepted and waiting cargo.

Definition at line 90 of file industry.h.

Referenced by GetOrCreateHistory().

## ◆ last_accepted

TimerGameEconomy::Date Industry::AcceptedCargo::last_accepted {}

Last day cargo was accepted by this industry.

Definition at line 89 of file industry.h.

## ◆ waiting

uint16_t Industry::AcceptedCargo::waiting = 0

Amount of cargo waiting to processed.

Definition at line 87 of file industry.h.

Referenced by IndustriesScopeResolver::GetVariable().

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

- src/industry.h