|
|
|
@ -651,8 +651,9 @@ static void CompaniesGenStatistics()
|
|
|
|
|
/**
|
|
|
|
|
* Add monthly inflation
|
|
|
|
|
* @param check_year Shall the inflation get stopped after 170 years?
|
|
|
|
|
* @return true if inflation is maxed and nothing was changed
|
|
|
|
|
*/
|
|
|
|
|
void AddInflation(bool check_year)
|
|
|
|
|
bool AddInflation(bool check_year)
|
|
|
|
|
{
|
|
|
|
|
/* The cargo payment inflation differs from the normal inflation, so the
|
|
|
|
|
* relative amount of money you make with a transport decreases slowly over
|
|
|
|
@ -669,7 +670,9 @@ void AddInflation(bool check_year)
|
|
|
|
|
* inflation doesn't add anything after that either; it even makes playing
|
|
|
|
|
* it impossible due to the diverging cost and income rates.
|
|
|
|
|
*/
|
|
|
|
|
if (check_year && (_cur_year - _settings_game.game_creation.starting_year) >= (ORIGINAL_MAX_YEAR - ORIGINAL_BASE_YEAR)) return;
|
|
|
|
|
if (check_year && (_cur_year - _settings_game.game_creation.starting_year) >= (ORIGINAL_MAX_YEAR - ORIGINAL_BASE_YEAR)) return true;
|
|
|
|
|
|
|
|
|
|
if (_economy.inflation_prices == MAX_INFLATION || _economy.inflation_payment == MAX_INFLATION) return true;
|
|
|
|
|
|
|
|
|
|
/* Approximation for (100 + infl_amount)% ** (1 / 12) - 100%
|
|
|
|
|
* scaled by 65536
|
|
|
|
@ -681,6 +684,8 @@ void AddInflation(bool check_year)
|
|
|
|
|
|
|
|
|
|
if (_economy.inflation_prices > MAX_INFLATION) _economy.inflation_prices = MAX_INFLATION;
|
|
|
|
|
if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION;
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|