diff options
Diffstat (limited to 'src/SMAPI.Mods.ErrorHandler')
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/ModEntry.cs | 8 | ||||
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs | 6 | ||||
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/manifest.json | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/SMAPI.Mods.ErrorHandler/ModEntry.cs b/src/SMAPI.Mods.ErrorHandler/ModEntry.cs index 22e68421..25056b5e 100644 --- a/src/SMAPI.Mods.ErrorHandler/ModEntry.cs +++ b/src/SMAPI.Mods.ErrorHandler/ModEntry.cs @@ -2,7 +2,9 @@ using System; using System.Reflection; using StardewModdingAPI.Events; using StardewModdingAPI.Internal.Patching; +#if SMAPI_DEPRECATED using StardewModdingAPI.Mods.ErrorHandler.ModPatches; +#endif using StardewModdingAPI.Mods.ErrorHandler.Patches; using StardewValley; @@ -39,10 +41,12 @@ namespace StardewModdingAPI.Mods.ErrorHandler new ObjectPatcher(), new SaveGamePatcher(this.Monitor, this.OnSaveContentRemoved), new SpriteBatchPatcher(), - new UtilityPatcher(), + new UtilityPatcher() +#if SMAPI_DEPRECATED // mod patches - new PyTkPatcher(helper.ModRegistry) + , new PyTkPatcher(helper.ModRegistry) +#endif ); // hook events diff --git a/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs b/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs index 9ee864db..f084902a 100644 --- a/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs +++ b/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs @@ -1,3 +1,4 @@ +#if SMAPI_DEPRECATED using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; @@ -10,7 +11,7 @@ using StardewModdingAPI.Internal; using StardewModdingAPI.Internal.Patching; // -// This is part of a three-part fix for PyTK 1.23.0 and earlier. When removing this, search +// This is part of a three-part fix for PyTK 1.23.* and earlier. When removing this, search // 'Platonymous.Toolkit' to find the other part in SMAPI and Content Patcher. // @@ -38,7 +39,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.ModPatches public PyTkPatcher(IModRegistry modRegistry) { IModMetadata? pyTk = (IModMetadata?)modRegistry.Get(@"Platonymous.Toolkit"); - if (pyTk is not null && !pyTk.Manifest.Version.IsNewerThan("1.23.0")) + if (pyTk is not null && pyTk.Manifest.Version.IsOlderThan("1.24.0")) PyTkPatcher.PyTk = pyTk; } @@ -77,3 +78,4 @@ namespace StardewModdingAPI.Mods.ErrorHandler.ModPatches } } } +#endif diff --git a/src/SMAPI.Mods.ErrorHandler/manifest.json b/src/SMAPI.Mods.ErrorHandler/manifest.json index 3a3c9283..cbcf0f82 100644 --- a/src/SMAPI.Mods.ErrorHandler/manifest.json +++ b/src/SMAPI.Mods.ErrorHandler/manifest.json @@ -1,9 +1,9 @@ { "Name": "Error Handler", "Author": "SMAPI", - "Version": "3.16.0", + "Version": "3.16.1", "Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.", "UniqueID": "SMAPI.ErrorHandler", "EntryDll": "ErrorHandler.dll", - "MinimumApiVersion": "3.16.0" + "MinimumApiVersion": "3.16.1" } |