diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-03 01:23:24 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-03 01:23:24 -0400 |
commit | e6d5883224863f3bf436b50179eadf1d686387da (patch) | |
tree | 5abd763ff06c595486da3a08cfde314bb1b2dffd | |
parent | 0ef31f0b9ee892493f6f5319240bde8f3dd270ca (diff) | |
download | SMAPI-e6d5883224863f3bf436b50179eadf1d686387da.tar.gz SMAPI-e6d5883224863f3bf436b50179eadf1d686387da.tar.bz2 SMAPI-e6d5883224863f3bf436b50179eadf1d686387da.zip |
fix mods on Linux/Mac no longer working after the game saves (#281)
-rw-r--r-- | release-notes.md | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/Context.cs | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/release-notes.md b/release-notes.md index df0a51da..bf9367e5 100644 --- a/release-notes.md +++ b/release-notes.md @@ -15,6 +15,7 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/1.11...1.12). For players: * The installer now lets you choose the install path if you have multiple copies of the game, instead of using the first path found. +* Fixed an issue where mods on Linux/Mac stopped working after the game saves. For mod developers: * Unknown mod manifest fields are now stored in `IManifest::ExtraFields`. diff --git a/src/StardewModdingAPI/Context.cs b/src/StardewModdingAPI/Context.cs index 415b4aac..2da14eed 100644 --- a/src/StardewModdingAPI/Context.cs +++ b/src/StardewModdingAPI/Context.cs @@ -1,4 +1,5 @@ using StardewValley; +using StardewValley.Menus; namespace StardewModdingAPI { @@ -12,7 +13,7 @@ namespace StardewModdingAPI public static bool IsSaveLoaded => Game1.hasLoadedGame && !string.IsNullOrEmpty(Game1.player.name); /// <summary>Whether the game is currently writing to the save file.</summary> - public static bool IsSaving => SaveGame.IsProcessing; + public static bool IsSaving => SaveGame.IsProcessing && (Game1.activeClickableMenu is SaveGameMenu || Game1.activeClickableMenu is ShippingMenu); // IsProcessing is never set to false on Linux/Mac /// <summary>Whether the game is currently running the draw loop.</summary> public static bool IsInDrawLoop { get; set; } |