From a9f8d89448d03b941efa318fecedccff1650dc2a Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Tue, 12 Dec 2023 10:17:21 -0500 Subject: [PATCH] Change: When using wallclock timekeeping, start in period (year) 1 --- src/misc.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 0dee94f470..dd95950dda 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -112,8 +112,14 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin if (reset_date) { TimerGameCalendar::Date new_date = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); TimerGameCalendar::SetDate(new_date, 0); - /* Keep the economy date synced with the calendar date. */ - TimerGameEconomy::SetDate(new_date.base(), 0); + + if (TimerGameEconomy::UsingWallclockUnits()) { + /* If using wallclock units, start at year 1. */ + TimerGameEconomy::SetDate(TimerGameEconomy::ConvertYMDToDate(1, 0, 1), 0); + } else { + /* Otherwise, we always keep the economy date synced with the calendar date. */ + TimerGameEconomy::SetDate(new_date.base(), 0); + } InitializeOldNames(); }