From d8dd4b4c18f571c6e8a7264f0168a69fd04bce70 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 7 Feb 2019 22:30:09 -0500 Subject: fix LoadStage.SaveParsed raised before save data available --- src/SMAPI/Framework/SGame.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/SMAPI/Framework') diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 6aff6c01..a90e8264 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -290,6 +290,7 @@ namespace StardewModdingAPI.Framework // Run async tasks synchronously to avoid issues due to mod events triggering // concurrently with game code. + bool saveParsed = false; if (Game1.currentLoader != null) { this.Monitor.Log("Game loader synchronising...", LogLevel.Trace); @@ -298,7 +299,8 @@ namespace StardewModdingAPI.Framework // raise load stage changed switch (Game1.currentLoader.Current) { - case 20: + case 20 when (!saveParsed && SaveGame.loaded != null): + saveParsed = true; this.OnLoadStageChanged(LoadStage.SaveParsed); break; -- cgit