2018-12-30 18:00:05 +08:00
|
|
|
using System;
|
2017-08-06 03:20:46 +08:00
|
|
|
using StardewModdingAPI;
|
2017-07-30 02:29:05 +08:00
|
|
|
using StardewModdingAPI.Events;
|
2016-07-09 14:39:44 +08:00
|
|
|
using StardewValley;
|
|
|
|
|
2017-07-28 08:28:39 +08:00
|
|
|
namespace Omegasis.Fall28SnowDay
|
2016-07-09 14:39:44 +08:00
|
|
|
{
|
2017-07-30 02:29:05 +08:00
|
|
|
/// <summary>The mod entry point.</summary>
|
|
|
|
public class Fall28SnowDay : Mod
|
2016-07-09 14:39:44 +08:00
|
|
|
{
|
2017-07-30 02:29:05 +08:00
|
|
|
/*********
|
|
|
|
** 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>
|
2017-02-22 15:29:00 +08:00
|
|
|
public override void Entry(IModHelper helper)
|
2016-07-09 14:39:44 +08:00
|
|
|
{
|
2017-08-06 03:20:46 +08:00
|
|
|
SaveEvents.BeforeSave += this.SaveEvents_BeforeSave;
|
2016-07-09 14:39:44 +08:00
|
|
|
}
|
|
|
|
|
2017-07-30 02:29:05 +08:00
|
|
|
|
|
|
|
/*********
|
|
|
|
** Private methods
|
|
|
|
*********/
|
2017-08-06 03:20:46 +08:00
|
|
|
/// <summary>The method invoked just before the game saves.</summary>
|
2017-07-30 02:29:05 +08:00
|
|
|
/// <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)
|
2016-07-09 14:39:44 +08:00
|
|
|
{
|
2017-08-06 03:20:46 +08:00
|
|
|
if (Game1.IsFall && Game1.dayOfMonth == 27)
|
2016-07-09 14:39:44 +08:00
|
|
|
Game1.weatherForTomorrow = Game1.weather_snow;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|