From 8dd94ac7f1fc1b77508b1140787c91413cbb817a Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 16 Dec 2018 19:58:11 -0500 Subject: [PATCH 1/3] fix error when hovering items in some cases --- docs/release-notes.md | 3 +++ src/SMAPI/Patches/ObjectErrorPatch.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 95de15ecf..467f2298a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,4 +1,7 @@ # Release notes +## 2.9.3 +* Fixed errors hovering items in some cases with SMAPI 2.9.2. + ## 2.9.2 * For players: * SMAPI now prevents invalid items from crashing the game on hover. diff --git a/src/SMAPI/Patches/ObjectErrorPatch.cs b/src/SMAPI/Patches/ObjectErrorPatch.cs index 2cbb60c5c..0481259db 100644 --- a/src/SMAPI/Patches/ObjectErrorPatch.cs +++ b/src/SMAPI/Patches/ObjectErrorPatch.cs @@ -49,7 +49,7 @@ private static bool Prefix(SObject __instance, ref string __result) return false; } - return false; + return true; } } } From 22297e2ee41568b305c164cd54b5d48e92046eca Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 16 Dec 2018 20:28:02 -0500 Subject: [PATCH 2/3] fix host peer not cleared when a multiplayer session ends --- docs/release-notes.md | 4 +++- src/SMAPI/Framework/SGame.cs | 2 +- src/SMAPI/Framework/SMultiplayer.cs | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 467f2298a..813f40a7a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,6 +1,8 @@ # Release notes ## 2.9.3 -* Fixed errors hovering items in some cases with SMAPI 2.9.2. +* For players: + * Fixed errors hovering items in some cases with SMAPI 2.9.2. + * Fixed some multiplayer features broken when a farmhand returns to title and rejoins. ## 2.9.2 * For players: diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 4d790d9fe..d515d3ad4 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -217,7 +217,7 @@ private void OnModMessageReceived(ModMessageModel message) private void OnReturnedToTitle() { this.Monitor.Log("Context: returned to title", LogLevel.Trace); - this.Multiplayer.Peers.Clear(); + this.Multiplayer.CleanupOnMultiplayerExit(); this.Events.ReturnedToTitle.RaiseEmpty(); #if !SMAPI_3_0_STRICT this.Events.Legacy_AfterReturnToTitle.Raise(); diff --git a/src/SMAPI/Framework/SMultiplayer.cs b/src/SMAPI/Framework/SMultiplayer.cs index 784edae35..29d9b2b8b 100644 --- a/src/SMAPI/Framework/SMultiplayer.cs +++ b/src/SMAPI/Framework/SMultiplayer.cs @@ -82,6 +82,13 @@ public SMultiplayer(IMonitor monitor, EventManager eventManager, JsonHelper json this.OnModMessageReceived = onModMessageReceived; } + /// Perform cleanup needed when a multiplayer session ends. + public void CleanupOnMultiplayerExit() + { + this.Peers.Clear(); + this.HostPeer = null; + } + #if !SMAPI_3_0_STRICT /// Handle sync messages from other players and perform other initial sync logic. public override void UpdateEarly() From a6f74e8fd4da62a7770f1697c6162313b30ba525 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 16 Dec 2018 20:36:49 -0500 Subject: [PATCH 3/3] update for release --- build/GlobalAssemblyInfo.cs | 4 ++-- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/GlobalAssemblyInfo.cs b/build/GlobalAssemblyInfo.cs index 15ae2eccd..079d9040a 100644 --- a/build/GlobalAssemblyInfo.cs +++ b/build/GlobalAssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Reflection; [assembly: AssemblyProduct("SMAPI")] -[assembly: AssemblyVersion("2.9.2")] -[assembly: AssemblyFileVersion("2.9.2")] +[assembly: AssemblyVersion("2.9.3")] +[assembly: AssemblyFileVersion("2.9.3")] diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 3d5399671..541d1045c 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "2.9.2", + "Version": "2.9.3", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "2.9.2" + "MinimumApiVersion": "2.9.3" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index 20935880e..d8dea0865 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "2.9.2", + "Version": "2.9.3", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "2.9.2" + "MinimumApiVersion": "2.9.3" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 13c300327..2d67284e8 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -29,7 +29,7 @@ public static class Constants ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.2"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.3"); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.32");