diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-23 20:53:12 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-09-23 20:53:12 -0400 |
commit | 2d36105c33ffba77eb979ef6ef0d2e7d906b09bc (patch) | |
tree | fe74c3eb7dea4e6e7d59c00cab2e2308c43da3d0 /src/StardewModdingAPI/Framework/Models | |
parent | a149f82b7a00d1ebf5ab33e529be93ce70873947 (diff) | |
download | SMAPI-2d36105c33ffba77eb979ef6ef0d2e7d906b09bc.tar.gz SMAPI-2d36105c33ffba77eb979ef6ef0d2e7d906b09bc.tar.bz2 SMAPI-2d36105c33ffba77eb979ef6ef0d2e7d906b09bc.zip |
drop support for SMAPI 1.x (#360)
Diffstat (limited to 'src/StardewModdingAPI/Framework/Models')
-rw-r--r-- | src/StardewModdingAPI/Framework/Models/Manifest.cs | 9 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/Models/ManifestDependency.cs | 12 |
2 files changed, 2 insertions, 19 deletions
diff --git a/src/StardewModdingAPI/Framework/Models/Manifest.cs b/src/StardewModdingAPI/Framework/Models/Manifest.cs index f97cb8ff..2e9566bf 100644 --- a/src/StardewModdingAPI/Framework/Models/Manifest.cs +++ b/src/StardewModdingAPI/Framework/Models/Manifest.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using Newtonsoft.Json; using StardewModdingAPI.Framework.Serialisation; @@ -35,23 +34,15 @@ namespace StardewModdingAPI.Framework.Models [JsonConverter(typeof(SFieldConverter))] public IManifestDependency[] Dependencies { get; set; } -#if !SMAPI_1_x /// <summary>The mod's unique ID in Nexus Mods (if any), used for update checks.</summary> public string NexusID { get; set; } /// <summary>The mod's organisation and project name on GitHub (if any), used for update checks.</summary> public string GitHubProject { get; set; } -#endif /// <summary>The unique mod ID.</summary> public string UniqueID { get; set; } -#if SMAPI_1_x - /// <summary>Whether the mod uses per-save config files.</summary> - [Obsolete("Use " + nameof(Mod) + "." + nameof(Mod.Helper) + "." + nameof(IModHelper.ReadConfig) + " instead")] - public bool PerSaveConfigs { get; set; } -#endif - /// <summary>Any manifest fields which didn't match a valid field.</summary> [JsonExtensionData] public IDictionary<string, object> ExtraFields { get; set; } diff --git a/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs b/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs index 67f906e3..5646b335 100644 --- a/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs +++ b/src/StardewModdingAPI/Framework/Models/ManifestDependency.cs @@ -1,4 +1,4 @@ -namespace StardewModdingAPI.Framework.Models +namespace StardewModdingAPI.Framework.Models { /// <summary>A mod dependency listed in a mod manifest.</summary> internal class ManifestDependency : IManifestDependency @@ -12,10 +12,8 @@ /// <summary>The minimum required version (if any).</summary> public ISemanticVersion MinimumVersion { get; set; } -#if !SMAPI_1_x /// <summary>Whether the dependency must be installed to use the mod.</summary> public bool IsRequired { get; set; } -#endif /********* ** Public methods @@ -24,19 +22,13 @@ /// <param name="uniqueID">The unique mod ID to require.</param> /// <param name="minimumVersion">The minimum required version (if any).</param> /// <param name="required">Whether the dependency must be installed to use the mod.</param> - public ManifestDependency(string uniqueID, string minimumVersion -#if !SMAPI_1_x - , bool required = true -#endif - ) + public ManifestDependency(string uniqueID, string minimumVersion, bool required = true) { this.UniqueID = uniqueID; this.MinimumVersion = !string.IsNullOrWhiteSpace(minimumVersion) ? new SemanticVersion(minimumVersion) : null; -#if !SMAPI_1_x this.IsRequired = required; -#endif } } } |