diff --git a/GeneralMods/NightOwl/NightOwl.cs b/GeneralMods/NightOwl/NightOwl.cs
index 9474ad49..cc48c311 100644
--- a/GeneralMods/NightOwl/NightOwl.cs
+++ b/GeneralMods/NightOwl/NightOwl.cs
@@ -74,6 +74,7 @@ namespace Omegasis.NightOwl
TimeEvents.TimeOfDayChanged += this.TimeEvents_TimeOfDayChanged;
TimeEvents.AfterDayStarted += this.TimeEvents_AfterDayStarted;
SaveEvents.AfterLoad += this.SaveEvents_AfterLoad;
+ SaveEvents.BeforeSave += this.SaveEvents_BeforeSave;
GameEvents.FourthUpdateTick += this.GameEvents_FourthUpdateTick;
}
@@ -105,6 +106,28 @@ namespace Omegasis.NightOwl
this.WriteErrorLog();
}
}
+
+ /// The method invoked before the game saves.
+ /// The event sender.
+ /// The event data.
+ public void SaveEvents_BeforeSave(object sender, EventArgs e)
+ {
+ int collapseFee = 0;
+ string[] passOutFees = Game1.player.mailbox
+ .Where(p => p.Contains("passedOut"))
+ .ToArray();
+ for (int idx=0; idxThe method invoked after the player loads a save.
/// The event sender.
@@ -136,8 +159,6 @@ namespace Omegasis.NightOwl
Game1.player.stamina = this.PreCollapseStamina;
if (this.Config.KeepHealthAfterCollapse)
Game1.player.health = this.PreCollapseHealth;
- if (this.Config.KeepMoneyAfterCollapse)
- Game1.player.money = this.PreCollapseMoney;
if (this.Config.KeepPositionAfterCollapse)
Game1.warpFarmer(this.PreCollapseMap, this.PreCollapseTile.X, this.PreCollapseTile.Y, false);
}