Stardew_Valley_Mods/GeneralMods/Fall28SnowDay/Fall28SnowDay.cs

35 lines
1.0 KiB
C#
Raw Normal View History

using System;
2017-08-06 03:20:46 +08:00
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
2017-07-28 08:28:39 +08:00
namespace Omegasis.Fall28SnowDay
{
/// <summary>The mod entry point.</summary>
public class Fall28SnowDay : Mod
{
/*********
** Public methods
*********/
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
public override void Entry(IModHelper helper)
{
2017-08-06 03:20:46 +08:00
SaveEvents.BeforeSave += this.SaveEvents_BeforeSave;
}
/*********
** Private methods
*********/
2017-08-06 03:20:46 +08:00
/// <summary>The method invoked just before the game saves.</summary>
/// <param name="sender">The event sender.</param>
/// <param name="e">The event data.</param>
2017-08-06 03:20:46 +08:00
public void SaveEvents_BeforeSave(object sender, EventArgs e)
{
2017-08-06 03:20:46 +08:00
if (Game1.IsFall && Game1.dayOfMonth == 27)
Game1.weatherForTomorrow = Game1.weather_snow;
}
}
}