Fix #14677: desync due to using newgame time settings to validate savegame time settings

This commit is contained in:
Rubidium
2025-12-13 10:37:12 +01:00
committed by dP
parent 2c528229cb
commit e6ebac3558

View File

@@ -673,7 +673,7 @@ static void ChangeMinutesPerYear(int32_t new_value)
static std::tuple<int32_t, uint32_t> GetMinutesPerYearRange(const IntSettingDesc &) static std::tuple<int32_t, uint32_t> GetMinutesPerYearRange(const IntSettingDesc &)
{ {
/* Allow a non-default value only if using Wallclock timekeeping units. */ /* 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 }; if (TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU)) return { CalendarTime::FROZEN_MINUTES_PER_YEAR, CalendarTime::MAX_MINUTES_PER_YEAR };
return { CalendarTime::DEF_MINUTES_PER_YEAR, CalendarTime::DEF_MINUTES_PER_YEAR }; return { CalendarTime::DEF_MINUTES_PER_YEAR, CalendarTime::DEF_MINUTES_PER_YEAR };
} }