|
@@ -6,24 +6,33 @@
|
|
|
*/
|
|
|
|
|
|
/** @file economy_type.h Types related to the economy. */
|
|
|
|
|
|
#ifndef ECONOMY_TYPE_H
|
|
|
#define ECONOMY_TYPE_H
|
|
|
|
|
|
#include "core/overflowsafe_type.hpp"
|
|
|
#include "core/enum_type.hpp"
|
|
|
|
|
|
typedef OverflowSafeInt64 Money;
|
|
|
|
|
|
/** Type of the game economy. */
|
|
|
enum EconomyType : uint8 {
|
|
|
ET_BEGIN = 0,
|
|
|
ET_ORIGINAL = 0,
|
|
|
ET_SMOOTH = 1,
|
|
|
ET_FROZEN = 2,
|
|
|
ET_END = 3,
|
|
|
};
|
|
|
|
|
|
/** Data of the economy. */
|
|
|
struct Economy {
|
|
|
Money max_loan; ///< NOSAVE: Maximum possible loan
|
|
|
int16 fluct; ///< Economy fluctuation status
|
|
|
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
|
|
|
uint64 inflation_prices; ///< Cumulated inflation of prices since game start; 16 bit fractional part
|
|
|
uint64 inflation_payment; ///< Cumulated inflation of cargo paypent since game start; 16 bit fractional part
|
|
|
|