summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-01-19 21:13:23 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-01-19 21:13:23 -0500
commit568ba2757e0b2947a8578128ff8f0a70eb075b38 (patch)
tree196d64063fe2eeaa15e4ad25e33fc75f334a7563 /src/SMAPI/Framework
parenta59572ee4eb64b075836247b92401c0fb554b6f0 (diff)
downloadSMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.tar.gz
SMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.tar.bz2
SMAPI-568ba2757e0b2947a8578128ff8f0a70eb075b38.zip
fix events being raised while the game is loading a save (#424)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SGame.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 4a17926c..2eb2da99 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -229,6 +229,13 @@ namespace StardewModdingAPI.Framework
return;
}
+ // game is asynchronously loading a save, block mod events to avoid conflicts
+ if (Game1.gameMode == Game1.loadingMode)
+ {
+ base.Update(gameTime);
+ return;
+ }
+
/*********
** Save events + suppress events during save
*********/