예제 #1
0
    /// <summary>
    /// Run at the end of a day, in order to remove older completed orders.
    /// </summary>
    /// <param name="daysplayed">current number of days played.</param>
    /// <exception cref="SaveNotLoadedError">Raised whenver the field is null and should not be. (Save not loaded).</exception>
    /// <remarks>Should remove orders more than seven days old.</remarks>
    public static void DayUpdate(uint daysplayed)
    {
        if (recentCompletedSO is null)
        {
            throw new SaveNotLoadedError();
        }
        List <string> keysRemoved = recentCompletedSO.dayUpdate(daysplayed);

        DialogueManager.ClearRepeated(keysRemoved);
        ModEntry.ModMonitor.DebugLog($"Keys removed from Recent Completed SOs: {string.Join(", ", keysRemoved)}");
    }