OpenTTD Source 20241224-master-gf74b0cf984
Economy Struct Reference

Data of the economy. More...

#include <economy_type.h>

Data Fields

Money max_loan
 NOSAVE: Maximum possible loan.
 
int16_t fluct
 Economy fluctuation status.
 
uint8_t interest_rate
 Interest.
 
uint8_t infl_amount
 inflation amount
 
uint8_t infl_amount_pr
 inflation rate for payment rates
 
uint32_t industry_daily_change_counter
 Bits 31-16 are number of industry to be performed, 15-0 are fractional collected daily.
 
uint32_t industry_daily_increment
 The value which will increment industry_daily_change_counter. Computed value. NOSAVE.
 
uint64_t inflation_prices
 Cumulated inflation of prices since game start; 16 bit fractional part.
 
uint64_t inflation_payment
 Cumulated inflation of cargo payment since game start; 16 bit fractional part.
 
Money old_max_loan_unround
 Old: Unrounded max loan.
 
uint16_t old_max_loan_unround_fract
 Old: Fraction of the unrounded max loan.
 

Detailed Description

Data of the economy.

Definition at line 43 of file economy_type.h.

Field Documentation

◆ fluct

int16_t Economy::fluct

Economy fluctuation status.

Definition at line 45 of file economy_type.h.

Referenced by EconomyIsInRecession().

◆ industry_daily_change_counter

uint32_t Economy::industry_daily_change_counter

Bits 31-16 are number of industry to be performed, 15-0 are fractional collected daily.

Definition at line 49 of file economy_type.h.

Referenced by StartupIndustryDailyChanges().

◆ industry_daily_increment

uint32_t Economy::industry_daily_increment

The value which will increment industry_daily_change_counter. Computed value. NOSAVE.

Definition at line 50 of file economy_type.h.

Referenced by StartupIndustryDailyChanges().

◆ infl_amount

uint8_t Economy::infl_amount

inflation amount

Definition at line 47 of file economy_type.h.

Referenced by AddInflation().

◆ infl_amount_pr

uint8_t Economy::infl_amount_pr

inflation rate for payment rates

Definition at line 48 of file economy_type.h.

Referenced by AddInflation().

◆ inflation_payment

uint64_t Economy::inflation_payment

Cumulated inflation of cargo payment since game start; 16 bit fractional part.

Definition at line 52 of file economy_type.h.

Referenced by AddInflation(), AfterLoadGame(), InitializeEconomy(), and RecomputePrices().

◆ inflation_prices

uint64_t Economy::inflation_prices

Cumulated inflation of prices since game start; 16 bit fractional part.

Definition at line 51 of file economy_type.h.

Referenced by AddInflation(), AfterLoadGame(), DoStartupNewCompany(), InitializeEconomy(), and RecomputePrices().

◆ interest_rate

uint8_t Economy::interest_rate

Interest.

Definition at line 46 of file economy_type.h.

Referenced by CompaniesPayInterest().

◆ max_loan

Money Economy::max_loan

NOSAVE: Maximum possible loan.

Definition at line 44 of file economy_type.h.

Referenced by DoStartupNewCompany(), Company::GetMaxLoan(), and RecomputePrices().

◆ old_max_loan_unround

Money Economy::old_max_loan_unround

Old: Unrounded max loan.

Definition at line 55 of file economy_type.h.

Referenced by AfterLoadGame().

◆ old_max_loan_unround_fract

uint16_t Economy::old_max_loan_unround_fract

Old: Fraction of the unrounded max loan.

Definition at line 56 of file economy_type.h.

Referenced by AfterLoadGame().


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