STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes per year: {STRING2}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. This setting does not affect the economic simulation of the game, and is only available when using wallclock timekeeping.
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
STR_CONFIG_SETTING_MINUTES_PER_YEAR_FROZEN :0 (calendar time frozen)
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING2}
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets automatically replaced when the renew conditions are fulfilled
static Date date; ///< Current date in days (day counter).
static DateFract date_fract; ///< Fractional part of the day.
static uint16_t sub_date_fract; ///< Subpart of date_fract that we use when calendar days are slower than economy days.
static YearMonthDay ConvertDateToYMD(Date date);
static Date ConvertYMDToDate(Year year, Month month, Day day);
@@ -42,6 +43,11 @@ public:
/**
* Storage class for Calendar time constants.
*/
class CalendarTime : public TimerGameConst<struct Calendar> {};
class CalendarTime : public TimerGameConst<struct Calendar> {
public:
static constexpr int DEF_MINUTES_PER_YEAR = 12;
static constexpr int FROZEN_MINUTES_PER_YEAR = 0;
static constexpr int MAX_MINUTES_PER_YEAR = 10080; // One week of real time. The actual max that doesn't overflow TimerGameCalendar::sub_date_fract is 10627, but this is neater.