summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-29 18:17:53 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-29 18:17:53 -0400
commit47a68fbb7bb6afc9ecaa3a13b450ddc865754de8 (patch)
treeb29cb0bf801a56973a7595b2293f5eda01c3c7c0 /src/SMAPI
parent2bb8e8353ba35c2db96f88a052400997232d25f8 (diff)
downloadSMAPI-47a68fbb7bb6afc9ecaa3a13b450ddc865754de8.tar.gz
SMAPI-47a68fbb7bb6afc9ecaa3a13b450ddc865754de8.tar.bz2
SMAPI-47a68fbb7bb6afc9ecaa3a13b450ddc865754de8.zip
deprecate PyTK compatibility mode
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs6
-rw-r--r--src/SMAPI/Framework/SCore.cs2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index 6a36ab48..cc6f8372 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -50,8 +50,10 @@ namespace StardewModdingAPI.Framework.ContentManagers
/*********
** Accessors
*********/
+#if SMAPI_DEPRECATED
/// <summary>Whether to enable legacy compatibility mode for PyTK scale-up textures.</summary>
internal static bool EnablePyTkLegacyMode;
+#endif
/*********
@@ -202,6 +204,7 @@ namespace StardewModdingAPI.Framework.ContentManagers
bool expectsRawData = typeof(T).IsAssignableTo(typeof(IRawTextureData));
bool asRawData = expectsRawData || this.UseRawImageLoading;
+#if SMAPI_DEPRECATED
// disable raw data if PyTK will rescale the image (until it supports raw data)
if (asRawData && !expectsRawData)
{
@@ -212,9 +215,10 @@ 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.* 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. This will no longer be supported in the upcoming SMAPI 4.0.0.", LogLevel.Warn);
}
}
+#endif
// load
if (asRawData)
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index a5e51bdf..16ff2537 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1672,6 +1672,7 @@ namespace StardewModdingAPI.Framework
// initialize translations
this.ReloadTranslations(loaded);
+#if SMAPI_DEPRECATED
// set temporary PyTK compatibility mode
// 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.
@@ -1679,6 +1680,7 @@ namespace StardewModdingAPI.Framework
IModInfo? pyTk = this.ModRegistry.Get("Platonymous.Toolkit");
ModContentManager.EnablePyTkLegacyMode = pyTk is not null && pyTk.Manifest.Version.IsOlderThan("1.24.0");
}
+#endif
// initialize loaded non-content-pack mods
this.Monitor.Log("Launching mods...", LogLevel.Debug);