diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-11 14:35:25 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-11 14:35:25 -0500 |
commit | 36c831f4c95c97344745783924cbdd8c7791d0ba (patch) | |
tree | a509de4bc7faad5f4a146b426ac6795c89963fd7 /src/StardewModdingAPI/Framework | |
parent | e393a2aad958c636ffaf5431e0e9dfdf6faf4461 (diff) | |
download | SMAPI-36c831f4c95c97344745783924cbdd8c7791d0ba.tar.gz SMAPI-36c831f4c95c97344745783924cbdd8c7791d0ba.tar.bz2 SMAPI-36c831f4c95c97344745783924cbdd8c7791d0ba.zip |
fix world-ready events being raised before the game finishes loading the save in SDV 1.2 (#231)
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs index 83af62e0..d1f500fb 100644 --- a/src/StardewModdingAPI/Framework/SGame.cs +++ b/src/StardewModdingAPI/Framework/SGame.cs @@ -30,7 +30,7 @@ namespace StardewModdingAPI.Framework /**** ** SMAPI state ****/ - /// <summary>The number of ticks until SMAPI should notify mods when <see cref="Game1.hasLoadedGame"/> is set.</summary> + /// <summary>The number of ticks until SMAPI should notify mods that the game has loaded.</summary> /// <remarks>Skipping a few frames ensures the game finishes initialising the world before mods try to change it.</remarks> private int AfterLoadTimer = 5; @@ -1114,7 +1114,7 @@ namespace StardewModdingAPI.Framework private void UpdateEventCalls() { // save loaded event - if (Game1.hasLoadedGame && this.AfterLoadTimer >= 0) + if (Game1.hasLoadedGame && !SaveGame.IsProcessing/*still loading save*/ && this.AfterLoadTimer >= 0) { if (this.AfterLoadTimer == 0) { |