From afd9074ad6e02be6c43c0d72e3f1b0234240d9d5 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Tue, 12 Dec 2023 10:18:24 -0500 Subject: [PATCH] Change: When using wallclock timekeeping, date cheat only changes calendar year --- src/cheat_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index d5f6d6ca25..e63e70b386 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -116,7 +116,9 @@ static int32_t ClickChangeDateCheat(int32_t new_value, int32_t) /* Now it's safe to actually change the date. */ TimerGameCalendar::SetDate(new_calendar_date, TimerGameCalendar::date_fract); - TimerGameEconomy::SetDate(new_economy_date, TimerGameEconomy::date_fract); + + /* If not using wallclock units, we keep economy date in sync with calendar date and must change it also. */ + if (!TimerGameEconomy::UsingWallclockUnits()) TimerGameEconomy::SetDate(new_economy_date, TimerGameEconomy::date_fract); CalendarEnginesMonthlyLoop(); SetWindowDirty(WC_STATUS_BAR, 0);