diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-30 13:40:48 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-30 13:40:48 -0400 |
commit | 79ad322a8e31e977e455817469427f9c3cf218fd (patch) | |
tree | 41e4693aeaeb709bced710e15dbb870cb9fd1b99 /src/SMAPI/Context.cs | |
parent | d67690ea3ea76512af194168af02a29120765247 (diff) | |
download | SMAPI-79ad322a8e31e977e455817469427f9c3cf218fd.tar.gz SMAPI-79ad322a8e31e977e455817469427f9c3cf218fd.tar.bz2 SMAPI-79ad322a8e31e977e455817469427f9c3cf218fd.zip |
tweak world-ready events to handle edge cases
In particular:
- world was never considered ready if the player's name was blank;
- AfterReturnToTitle didn't trigger after being disconnected in multiplayer (#545).
Diffstat (limited to 'src/SMAPI/Context.cs')
-rw-r--r-- | src/SMAPI/Context.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Context.cs b/src/SMAPI/Context.cs index 79067b2d..74def086 100644 --- a/src/SMAPI/Context.cs +++ b/src/SMAPI/Context.cs @@ -35,7 +35,7 @@ namespace StardewModdingAPI ** Internal ****/ /// <summary>Whether a player save has been loaded.</summary> - internal static bool IsSaveLoaded => Game1.hasLoadedGame && !string.IsNullOrEmpty(Game1.player.Name); + internal static bool IsSaveLoaded => Game1.hasLoadedGame && !(Game1.activeClickableMenu is TitleMenu); /// <summary>Whether the game is currently writing to the save file.</summary> internal static bool IsSaving => Game1.activeClickableMenu is SaveGameMenu || Game1.activeClickableMenu is ShippingMenu; // saving is performed by SaveGameMenu, but it's wrapped by ShippingMenu on days when the player shipping something |