This commit is contained in:
@@ -667,6 +667,15 @@ static void ChangeMinutesPerYear(int32_t new_value)
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the valid range of the "minutes per calendar year" setting. */
|
||||
static std::tuple<int32_t, uint32_t> GetMinutesPerYearRange(const IntSettingDesc &)
|
||||
{
|
||||
/* Allow a non-default value only if using Wallclock timekeeping units. */
|
||||
if (_settings_newgame.economy.timekeeping_units == TKU_WALLCLOCK) return { CalendarTime::FROZEN_MINUTES_PER_YEAR, CalendarTime::MAX_MINUTES_PER_YEAR };
|
||||
|
||||
return { CalendarTime::DEF_MINUTES_PER_YEAR, CalendarTime::DEF_MINUTES_PER_YEAR };
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-callback check when trying to change the timetable mode. This is locked to Seconds when using wallclock units.
|
||||
* @param Unused.
|
||||
|
||||
Reference in New Issue
Block a user