summaryrefslogtreecommitdiff
path: root/src/economy_type.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-09-15 17:18:22 +0000
committerbelugas <belugas@openttd.org>2008-09-15 17:18:22 +0000
commit0682dc3a0d97ecee26d807476071d5f552f86212 (patch)
treebbcf66eb7b0fe5be0cf11258b7cfa2654517ac4b /src/economy_type.h
parent606f4defdca281a3f918c9525dbd4d525ad11131 (diff)
downloadopenttd-0682dc3a0d97ecee26d807476071d5f552f86212.tar.xz
(svn r14332) -Fix[FS#1885]: Balance the monthly random industry changes, by introducing a daily random industry change.
This will allow to perform more changes per month on big maps and less on smaller maps, while not overtaxing the IndustryMonthlyLoop process. Thanks to frosch, for nice code ideas and rewrites
Diffstat (limited to 'src/economy_type.h')
-rw-r--r--src/economy_type.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/economy_type.h b/src/economy_type.h
index f516e57ef..0b7b581d3 100644
--- a/src/economy_type.h
+++ b/src/economy_type.h
@@ -12,13 +12,15 @@
typedef OverflowSafeInt64 Money;
struct Economy {
- Money max_loan; ///< Maximum possible loan
- Money max_loan_unround; ///< Economy fluctuation status
- uint16 max_loan_unround_fract; ///< Fraction of the unrounded max loan
+ Money max_loan; ///< Maximum possible loan
+ Money max_loan_unround; ///< Economy fluctuation status
+ uint16 max_loan_unround_fract; ///< Fraction of the unrounded max loan
int16 fluct;
- byte interest_rate; ///< Interest
- byte infl_amount; ///< inflation amount
- byte infl_amount_pr; ///< inflation rate for payment rates
+ byte interest_rate; ///< Interest
+ byte infl_amount; ///< inflation amount
+ byte infl_amount_pr; ///< inflation rate for payment rates
+ uint32 industry_daily_change_counter; ///< Bits 31-16 are number of industry to be performed, 15-0 are fractional collected daily
+ uint32 industry_daily_increment; ///< The value which will increment industry_daily_change_counter. Computed value. NOSAVE
};
struct Subsidy {