From fee89a99da3295c6bb35d6543a112db8924057de Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 24 Apr 2017 12:39:06 -0400 Subject: remove new manifest field for minimum game version (#264) This was added to support parallel releases for SDV 1.11 + 1.2-beta, but SDV 1.2 is now out of beta. Mods should specify the minimum SMAPI version instead if needed. --- release-notes.md | 1 - src/StardewModdingAPI/Framework/Manifest.cs | 3 --- src/StardewModdingAPI/IManifest.cs | 3 --- src/StardewModdingAPI/Program.cs | 19 ------------------- 4 files changed, 26 deletions(-) diff --git a/release-notes.md b/release-notes.md index 1dd1fa6b..d600db57 100644 --- a/release-notes.md +++ b/release-notes.md @@ -25,7 +25,6 @@ For players: For mod developers: * Mods are now initialised after the `Initialize`/`LoadContent` phase, which means the `GameEvents.Initialize` and `GameEvents.LoadContent` events are deprecated. You can move any logic in those methods to your mod's `Entry` method. -* Mods can now specify a minimum game version in their `manifest.json`. * Added `IsBetween` and string overloads to the `ISemanticVersion` methods. * Fixed mouse-changed event never updating prior mouse position. * Fixed `monitor.ExitGameImmediately` not working correctly. diff --git a/src/StardewModdingAPI/Framework/Manifest.cs b/src/StardewModdingAPI/Framework/Manifest.cs index f9c90ff6..189da9a8 100644 --- a/src/StardewModdingAPI/Framework/Manifest.cs +++ b/src/StardewModdingAPI/Framework/Manifest.cs @@ -26,9 +26,6 @@ namespace StardewModdingAPI.Framework /// The minimum SMAPI version required by this mod, if any. public string MinimumApiVersion { get; set; } - /// The minimum game version required by this mod, if any. - public string MinimumGameVersion { get; set; } - /// The name of the DLL in the directory that has the method. public string EntryDll { get; set; } diff --git a/src/StardewModdingAPI/IManifest.cs b/src/StardewModdingAPI/IManifest.cs index f73b0c8f..3e4b7513 100644 --- a/src/StardewModdingAPI/IManifest.cs +++ b/src/StardewModdingAPI/IManifest.cs @@ -18,9 +18,6 @@ /// The minimum SMAPI version required by this mod, if any. string MinimumApiVersion { get; set; } - /// The minimum game version required by this mod, if any. - string MinimumGameVersion { get; set; } - /// The unique mod ID. string UniqueID { get; set; } diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index db4fbfc0..31aeb3a6 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -460,25 +460,6 @@ namespace StardewModdingAPI } } - // validate game version - if (!string.IsNullOrWhiteSpace(manifest.MinimumGameVersion)) - { - try - { - ISemanticVersion minVersion = new SemanticVersion(manifest.MinimumGameVersion); - if (minVersion.IsNewerThan(Constants.GameVersion)) - { - this.Monitor.Log($"{skippedPrefix} because it needs Stardew Valley {minVersion} or later. Please update Stardew Valley to the latest version to use this mod.", LogLevel.Error); - continue; - } - } - catch (FormatException ex) when (ex.Message.Contains("not a valid semantic version")) - { - this.Monitor.Log($"{skippedPrefix} because it has an invalid minimum game version '{manifest.MinimumApiVersion}'. This should be a semantic version number like {Constants.GameVersion}.", LogLevel.Error); - continue; - } - } - // create per-save directory if (manifest.PerSaveConfigs) { -- cgit