diff options
| author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-01 16:21:35 -0500 |
|---|---|---|
| committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-01 16:21:35 -0500 |
| commit | c8d627cdf2ae3126584ec2500877ff19987db17f (patch) | |
| tree | 2cc6f604df00027239476acf3a74ae6bb0761323 /src/SMAPI.Toolkit/Framework/Clients/WebApi | |
| parent | f976b5c0f095a881fc20f6ce5dcf5a50ebb2b5da (diff) | |
| parent | 17a9193fd28c527dcba40360702adb277736cc45 (diff) | |
| download | SMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.tar.gz SMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.tar.bz2 SMAPI-c8d627cdf2ae3126584ec2500877ff19987db17f.zip | |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/Clients/WebApi')
| -rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs | 22 | ||||
| -rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs | 16 |
2 files changed, 14 insertions, 24 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs index f1bcfccc..2f58a3f1 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs @@ -1,5 +1,3 @@ -using System; - namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi { /// <summary>Metadata about a mod.</summary> @@ -17,26 +15,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// <summary>Optional extended data which isn't needed for update checks.</summary> public ModExtendedMetadataModel Metadata { get; set; } - /// <summary>The main version.</summary> - [Obsolete] - public ModEntryVersionModel Main { get; set; } - - /// <summary>The latest optional version, if newer than <see cref="Main"/>.</summary> - [Obsolete] - public ModEntryVersionModel Optional { get; set; } - - /// <summary>The latest unofficial version, if newer than <see cref="Main"/> and <see cref="Optional"/>.</summary> - [Obsolete] - public ModEntryVersionModel Unofficial { get; set; } - - /// <summary>The latest unofficial version for the current Stardew Valley or SMAPI beta, if any (see <see cref="HasBetaInfo"/>).</summary> - [Obsolete] - public ModEntryVersionModel UnofficialForBeta { get; set; } - - /// <summary>Whether a Stardew Valley or SMAPI beta which affects mod compatibility is in progress. If this is true, <see cref="UnofficialForBeta"/> should be used for beta versions of SMAPI instead of <see cref="Unofficial"/>.</summary> - [Obsolete] - public bool? HasBetaInfo { get; set; } - /// <summary>The errors that occurred while fetching update data.</summary> public string[] Errors { get; set; } = new string[0]; } diff --git a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs index 4a697585..8c21e4e0 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs @@ -55,7 +55,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// <summary>The latest unofficial version, if newer than <see cref="Main"/> and <see cref="Optional"/>.</summary> public ModEntryVersionModel Unofficial { get; set; } - /// <summary>The latest unofficial version for the current Stardew Valley or SMAPI beta, if any (see <see cref="HasBetaInfo"/>).</summary> + /// <summary>The latest unofficial version for the current Stardew Valley or SMAPI beta, if any.</summary> public ModEntryVersionModel UnofficialForBeta { get; set; } /**** @@ -84,6 +84,15 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// <summary>The beta game or SMAPI version which broke this mod, if applicable.</summary> public string BetaBrokeIn { get; set; } + /**** + ** Version mappings + ****/ + /// <summary>Maps local versions to a semantic version for update checks.</summary> + public IDictionary<string, string> MapLocalVersions { get; set; } + + /// <summary>Maps remote versions to a semantic version for update checks.</summary> + public IDictionary<string, string> MapRemoteVersions { get; set; } + /********* ** Public methods @@ -127,13 +136,16 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi this.BetaCompatibilityStatus = wiki.BetaCompatibility?.Status; this.BetaCompatibilitySummary = wiki.BetaCompatibility?.Summary; this.BetaBrokeIn = wiki.BetaCompatibility?.BrokeIn; + + this.MapLocalVersions = wiki.MapLocalVersions; + this.MapRemoteVersions = wiki.MapRemoteVersions; } // internal DB data if (db != null) { this.ID = this.ID.Union(db.FormerIDs).ToArray(); - this.Name = this.Name ?? db.DisplayName; + this.Name ??= db.DisplayName; } } |
