From 6ecc1fd7f2f2af0ca62bbd59b4aa76b0fc8b1d0f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 21 Oct 2023 23:44:22 -0300 Subject: [PATCH] Fixed Cheat Start not initiating time-based events --- include/clock.h | 1 + src/clock.c | 2 +- src/debug.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/clock.h b/include/clock.h index aa179bf6fbdb..0cfd3db9ed7a 100644 --- a/include/clock.h +++ b/include/clock.h @@ -3,6 +3,7 @@ // TODO: time of day and seconds in a day defines +void InitTimeBasedEvents(void); void DoTimeBasedEvents(void); #endif // GUARD_CLOCK_H diff --git a/src/clock.c b/src/clock.c index 125d403bb34f..76297b4f4c6f 100644 --- a/src/clock.c +++ b/src/clock.c @@ -15,7 +15,7 @@ static void UpdatePerDay(struct Time *localTime); static void UpdatePerMinute(struct Time *localTime); -static void InitTimeBasedEvents(void) +void InitTimeBasedEvents(void) { FlagSet(FLAG_SYS_CLOCK_SET); RtcCalcLocalTime(); diff --git a/src/debug.c b/src/debug.c index f915235d8b64..be1085edd754 100644 --- a/src/debug.c +++ b/src/debug.c @@ -9,6 +9,7 @@ #include "global.h" #include "battle.h" #include "battle_setup.h" +#include "clock.h" #include "coins.h" #include "credits.h" #include "data.h" @@ -1983,6 +1984,7 @@ static void DebugAction_Util_Clear_Boxes(u8 taskId) } static void DebugAction_Util_CheatStart(u8 taskId) { + InitTimeBasedEvents(); Debug_DestroyMenu_Full_Script(taskId, Debug_CheatStart); } static void DebugAction_Util_HatchAnEgg(u8 taskId)