private void ReceiveLoadedGame(object sender, EventArgs e) { // Check for new save if (Game1.currentSeason.Equals(Constants.SPRING) && Game1.dayOfMonth == 0 && Game1.year == 1) { return; } generalNotification.DoNewDayNotifications(); harvestableNotification.CheckHarvestsAroundFarm(); }
/// <summary>Raised after the player loads a save slot and the world is initialised.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) { // Check for new save if (Game1.currentSeason.Equals("Spring") && Game1.dayOfMonth == 0 && Game1.year == 1) { return; } generalNotification.DoNewDayNotifications(Helper.Translation); harvestableNotification.CheckHarvestsAroundFarm(); }
/// <summary>Raised after the in-game clock time changes.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void OnTimeChanged(object sender, TimeChangedEventArgs e) { // send daily notifications if (Config.RunNotificationsTime != 600 && Config.RunNotificationsTime == e.NewTime) { generalNotification.DoNewDayNotifications(Helper.Translation); harvestableNotification.CheckHarvestsAroundFarm(); } if (Config.NotifyBirthdayReminder && e.NewTime == Config.BirthdayReminderTime) { GeneralNotification.DoBirthdayReminder(Helper.Translation); } if (Config.ShowWeatherNextDay && e.NewTime == Config.WeatherNextDayTime) { GeneralNotification.DoWeatherReminder(Helper.Translation); } }
/// <summary>Raised after the game begins a new day (including when the player loads a save).</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void OnDayStarted(object sender, DayStartedEventArgs e) { if (Game1.currentSeason.Equals("Spring") && Game1.dayOfMonth == 0 && Game1.year == 1) { return; } // send daily notifications generalNotification.DoNewDayNotifications(Helper.Translation); harvestableNotification.CheckHarvestsAroundFarm(); }