summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-11 17:28:39 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-11 17:28:39 -0500
commit95e519796773a2ef17ec482e27cd4403282e2cd1 (patch)
treee58e96ea22c3c70432b5d4ada8afb7d0b6efb574
parentd881f568565f8a12025e013cf92eaa025aac8c7c (diff)
downloadSMAPI-95e519796773a2ef17ec482e27cd4403282e2cd1.tar.gz
SMAPI-95e519796773a2ef17ec482e27cd4403282e2cd1.tar.bz2
SMAPI-95e519796773a2ef17ec482e27cd4403282e2cd1.zip
fix SaveEvents.AfterLoad being raised during the new-game intro before the player is initialised
-rw-r--r--release-notes.md1
-rw-r--r--src/StardewModdingAPI/Framework/SGame.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/release-notes.md b/release-notes.md
index 22df8f70..96e6439a 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -36,6 +36,7 @@ For mod developers:
* SMAPI now writes XNA input enums (`Buttons` and `Keys`) to JSON as strings automatically, so mods no longer need to add a `StringEnumConverter` themselves for those.
* Logs now show the OS caption (like "Windows 10") instead of its internal version when available.
* Logs now always use `\r\n` to simplify crossplatform viewing.
+* Fixed `SaveEvents.AfterLoad` being raised during the new-game intro before the player is initialised.
* Several obsolete APIs have been removed (see [deprecation guide](http://canimod.com/guides/updating-a-smapi-mod)),
and all _notice_-level deprecations have been increased to _info_.
* Deprecated the experimental `IConfigFile`.
diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs
index 5edb103e..d551ff5b 100644
--- a/src/StardewModdingAPI/Framework/SGame.cs
+++ b/src/StardewModdingAPI/Framework/SGame.cs
@@ -1094,7 +1094,7 @@ namespace StardewModdingAPI.Framework
}
// save loaded event
- if (Game1.hasLoadedGame && !SaveGame.IsProcessing/*still loading save*/ && this.AfterLoadTimer >= 0)
+ if (Constants.IsSaveLoaded && !SaveGame.IsProcessing/*still loading save*/ && this.AfterLoadTimer >= 0)
{
if (this.AfterLoadTimer == 0)
{