diff options
-rw-r--r-- | release-notes.md | 10 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 7 |
2 files changed, 10 insertions, 7 deletions
diff --git a/release-notes.md b/release-notes.md index bb7b7dfa..4da9132d 100644 --- a/release-notes.md +++ b/release-notes.md @@ -18,11 +18,11 @@ For mod developers: * Added support for string versions (like `"1.0-alpha"`) in `manifest.json`. * Added `IEquatable<ISemanticVersion>` to `ISemanticVersion`. * Removed the TrainerMod `save` and `load` commands. -* **Breaking changes:** - * Removed all deprecated code. - * Removed support for mods with no `Name`, `Version`, or `UniqueID` in their manifest. - * Removed support for mods with a non-unique `UniqueID` value in their manifest. - * Mods can no longer access SMAPI internals using the reflection helper, to discourage fragile mods. +* Removed all deprecated code. +* Removed support for mods with no `Name`, `Version`, or `UniqueID` in their manifest. +* Removed support for mods with a non-unique `UniqueID` value in their manifest. +* Restrict mods from accessing SMAPI internals using its reflection helper, to discourage fragile mods. +* Fixed issue where `TimeEvents.AfterDayStarted` was raised during the new-game intro. ## 1.15.2 For players: diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs index d6f1a05b..bec6538b 100644 --- a/src/StardewModdingAPI/Framework/SGame.cs +++ b/src/StardewModdingAPI/Framework/SGame.cs @@ -19,7 +19,6 @@ using StardewValley.Menus; using StardewValley.Tools; using xTile.Dimensions; using xTile.Layers; -using SFarmer = StardewValley.Farmer; namespace StardewModdingAPI.Framework { @@ -318,6 +317,11 @@ namespace StardewModdingAPI.Framework *********/ if (Context.IsSaveLoaded && !SaveGame.IsProcessing /*still loading save*/ && this.AfterLoadTimer >= 0) { +#if !SMAPI_1_x + if (Game1.dayOfMonth != 0) // wait until new-game intro finishes (world not fully initialised yet) +#endif + this.AfterLoadTimer--; + if (this.AfterLoadTimer == 0) { this.Monitor.Log($"Context: loaded saved game '{Constants.SaveFolderName}', starting {Game1.currentSeason} {Game1.dayOfMonth} Y{Game1.year}.", LogLevel.Trace); @@ -329,7 +333,6 @@ namespace StardewModdingAPI.Framework #endif TimeEvents.InvokeAfterDayStarted(this.Monitor); } - this.AfterLoadTimer--; } /********* |