summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-29 18:00:41 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-29 18:00:41 -0400
commit2bb8e8353ba35c2db96f88a052400997232d25f8 (patch)
tree41e1c9ffd71d4a1889ce1a426179872eea03501b
parentc2f474bf88a43e293d28851785a57a9ca1e60f2e (diff)
downloadSMAPI-2bb8e8353ba35c2db96f88a052400997232d25f8.tar.gz
SMAPI-2bb8e8353ba35c2db96f88a052400997232d25f8.tar.bz2
SMAPI-2bb8e8353ba35c2db96f88a052400997232d25f8.zip
update compatibility workaround for the recent PyTK update
-rw-r--r--docs/release-notes.md4
-rw-r--r--src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs4
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml4
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs2
-rw-r--r--src/SMAPI/Framework/SCore.cs4
5 files changed, 10 insertions, 8 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 68dc7874..5e84136c 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -8,7 +8,9 @@
-->
## Upcoming release
-* Fixed broken mods sometimes incorrectly listed as duplicate.
+* For players:
+ * Updated compatibility workaround for the recent PyTK update.
+ * Fixed broken mods sometimes incorrectly listed as duplicate.
## 3.16.0
Released 22 August 2022 for Stardew Valley 1.5.6 or later. See [release highlights](https://www.patreon.com/posts/70797008).
diff --git a/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs b/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs
index 9ee864db..83cd42b9 100644
--- a/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs
+++ b/src/SMAPI.Mods.ErrorHandler/ModPatches/PyTkPatcher.cs
@@ -10,7 +10,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 +38,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;
}
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index f71c6ac1..24fe5fa2 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -17,7 +17,7 @@
LogModInfo[] outdatedMods = log?.Mods.Where(mod => mod.HasUpdate).ToArray() ?? Array.Empty<LogModInfo>();
LogModInfo? errorHandler = log?.Mods.FirstOrDefault(p => p.IsCodeMod && p.Name == "Error Handler");
bool hasOlderErrorHandler = errorHandler?.GetParsedVersion() is not null && log?.ApiVersionParsed is not null && log.ApiVersionParsed.IsNewerThan(errorHandler.GetParsedVersion());
- bool isPyTkCompatibilityMode = log?.ApiVersionParsed?.IsOlderThan("3.15.0") is false && log.Mods.Any(p => p.IsCodeMod && p.Name == "PyTK" && p.GetParsedVersion()?.IsOlderThan("1.23.1") is true);
+ bool isPyTkCompatibilityMode = log?.ApiVersionParsed?.IsOlderThan("3.15.0") is false && log.Mods.Any(p => p.IsCodeMod && p.Name == "PyTK" && p.GetParsedVersion()?.IsOlderThan("1.24.0") is true);
// get filters
IDictionary<string, bool> defaultFilters = Enum
@@ -257,7 +257,7 @@ else if (log?.IsValid == true)
}
@if (isPyTkCompatibilityMode)
{
- <li>PyTK 1.23.0 or earlier isn't compatible with newer SMAPI performance optimizations. This may increase loading times or in-game lag.</li>
+ <li>PyTK 1.23.* or earlier isn't compatible with newer SMAPI performance optimizations. This may increase loading times or in-game lag.</li>
}
@if (outdatedMods.Any())
{
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index 8ecbc4cc..6a36ab48 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -212,7 +212,7 @@ namespace StardewModdingAPI.Framework.ContentManagers
// current file has a '.pytk.json' rescale file though, since PyTK may still
// rescale it if the original asset or another edit gets rescaled.
asRawData = false;
- this.Monitor.LogOnce("Enabled compatibility mode for PyTK 1.23.0 or earlier. This won't cause any issues, but may impact performance.", LogLevel.Warn);
+ this.Monitor.LogOnce("Enabled compatibility mode for PyTK 1.23.* or earlier. This won't cause any issues, but may impact performance.", LogLevel.Warn);
}
}
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 0f86ed6b..a5e51bdf 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1673,11 +1673,11 @@ namespace StardewModdingAPI.Framework
this.ReloadTranslations(loaded);
// set temporary PyTK compatibility mode
- // This is part of a three-part fix for PyTK 1.23.0 and earlier. When removing this,
+ // 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.
{
IModInfo? pyTk = this.ModRegistry.Get("Platonymous.Toolkit");
- ModContentManager.EnablePyTkLegacyMode = pyTk is not null && pyTk.Manifest.Version.IsOlderThan("1.23.1");
+ ModContentManager.EnablePyTkLegacyMode = pyTk is not null && pyTk.Manifest.Version.IsOlderThan("1.24.0");
}
// initialize loaded non-content-pack mods