private void OnTimeChanged(object?sender, TimeChangedEventArgs e) { MidDayScheduleEditor.AttemptAdjustGISchedule(e); if (e.NewTime > 615 && !this.haveFixedSchedulesToday) { // No longer need the exclusions cache. IslandSouthPatches.ClearCache(); ScheduleUtilities.FixUpSchedules(); if (Globals.Config.DebugMode) { ScheduleDebugPatches.FixNPCs(); } this.haveFixedSchedulesToday = true; } }
/// <summary> /// Clear all caches at the end of the day and if the player exits to menu. /// </summary> private void ClearCaches() { DialoguePatches.ClearTalkRecord(); DialogueUtilities.ClearDialogueLog(); if (Context.IsSplitScreen && Context.ScreenId != 0) { return; } this.haveFixedSchedulesToday = false; MidDayScheduleEditor.Reset(); IslandSouthPatches.ClearCache(); GIScheduler.ClearCache(); GIScheduler.DayEndReset(); ConsoleCommands.ClearCache(); ScheduleUtilities.ClearCache(); }