diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-06 18:34:58 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-06 18:34:58 -0400 |
commit | 215a863945396d6b733654f1ba60bf04dc4db85a (patch) | |
tree | 5bdfad7a0aceaa270520527621ae744b730921f8 | |
parent | 077d8e4f401ad1806c6af0540f432366314a2300 (diff) | |
download | SMAPI-215a863945396d6b733654f1ba60bf04dc4db85a.tar.gz SMAPI-215a863945396d6b733654f1ba60bf04dc4db85a.tar.bz2 SMAPI-215a863945396d6b733654f1ba60bf04dc4db85a.zip |
drop update checks for Stardew64Installer
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI/Constants.cs | 15 | ||||
-rw-r--r-- | src/SMAPI/Framework/Models/SConfig.cs | 3 | ||||
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 33 | ||||
-rw-r--r-- | src/SMAPI/SMAPI.config.json | 5 |
5 files changed, 1 insertions, 56 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 6d505d40..732cd530 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -9,6 +9,7 @@ * Added `--use-current-shell` to avoid opening a separate terminal window. * Fixed `--no-terminal` still opening a terminal window, even if nothing is logged to it (thanks to Ryhon0!). * SMAPI now fixes many case-sensitive mod file path issues automatically. + * Dropped update checks for the unofficial 64-bit patcher (obsolete since SMAPI 3.12.6). * Improved translations. Thanks to ChulkyBow (updated Ukrainian)! * For the Console Commands mod: diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 6b9e9b05..2fac8c94 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -291,21 +291,6 @@ namespace StardewModdingAPI return new PlatformAssemblyMap(targetPlatform, removeAssemblyReferences.ToArray(), targetAssemblies.ToArray()); } - /// <summary>Get whether the game assembly was patched by Stardew64Installer.</summary> - /// <param name="version">The version of Stardew64Installer which was applied to the game assembly, if any.</param> - internal static bool IsPatchedByStardew64Installer(out ISemanticVersion version) - { - PropertyInfo property = typeof(Game1).GetProperty("Stardew64InstallerVersion"); - if (property == null) - { - version = null; - return false; - } - - version = new SemanticVersion((string)property.GetValue(null)); - return true; - } - /********* ** Private methods diff --git a/src/SMAPI/Framework/Models/SConfig.cs b/src/SMAPI/Framework/Models/SConfig.cs index 35180df2..1e78f316 100644 --- a/src/SMAPI/Framework/Models/SConfig.cs +++ b/src/SMAPI/Framework/Models/SConfig.cs @@ -52,9 +52,6 @@ namespace StardewModdingAPI.Framework.Models /// <summary>SMAPI's GitHub project name, used to perform update checks.</summary> public string GitHubProjectName { get; set; } - /// <summary>Stardew64Installer's GitHub project name, used to perform update checks.</summary> - public string Stardew64InstallerGitHubProjectName { get; set; } - /// <summary>The base URL for SMAPI's web API, used to perform update checks.</summary> public string WebApiBaseUrl { get; set; } diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index cc531de9..b471c383 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -1450,39 +1450,6 @@ namespace StardewModdingAPI.Framework this.LogManager.WriteUpdateMarker(updateFound.ToString(), updateUrl); } - // check Stardew64Installer version - if (Constants.IsPatchedByStardew64Installer(out ISemanticVersion patchedByVersion)) - { - try - { - // fetch update check - ModEntryModel response = client.GetModInfo(new[] { new ModSearchEntryModel("Steviegt6.Stardew64Installer", patchedByVersion, new[] { $"GitHub:{this.Settings.Stardew64InstallerGitHubProjectName}" }) }, apiVersion: Constants.ApiVersion, gameVersion: Constants.GameVersion, platform: Constants.Platform).Single().Value; - ISemanticVersion updateFound = response.SuggestedUpdate?.Version; - string updateUrl = response.SuggestedUpdate?.Url ?? Constants.HomePageUrl; - - // log message - if (updateFound != null) - this.Monitor.Log($"You can update Stardew64Installer to {updateFound}: {updateUrl}", LogLevel.Alert); - else - this.Monitor.Log(" Stardew64Installer okay."); - - // show errors - if (response.Errors.Any()) - { - this.Monitor.Log("Couldn't check for a new version of Stardew64Installer. This won't affect your game, but you may not be notified of new versions if this keeps happening.", LogLevel.Warn); - this.Monitor.Log($"Error: {string.Join("\n", response.Errors)}"); - } - } - catch (Exception ex) - { - this.Monitor.Log("Couldn't check for a new version of Stardew64Installer. This won't affect your game, but you won't be notified of new versions if this keeps happening.", LogLevel.Warn); - this.Monitor.Log(ex is WebException && ex.InnerException == null - ? $"Error: {ex.Message}" - : $"Error: {ex.GetLogSummary()}" - ); - } - } - // check mod versions if (mods.Any()) { diff --git a/src/SMAPI/SMAPI.config.json b/src/SMAPI/SMAPI.config.json index e62c8880..49056e83 100644 --- a/src/SMAPI/SMAPI.config.json +++ b/src/SMAPI/SMAPI.config.json @@ -70,11 +70,6 @@ copy all the settings, or you may cause bugs due to overridden changes in future "GitHubProjectName": "Pathoschild/SMAPI", /** - * Stardew64Installer's GitHub project name, used to perform update checks. - */ - "Stardew64InstallerGitHubProjectName": "Steviegt6/Stardew64Installer", - - /** * The base URL for SMAPI's web API, used to perform update checks. */ "WebApiBaseUrl": "https://smapi.io/api/", |