From 83aec980b3ee739fb4bc251217556b3ae44f741b Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Sat, 1 Oct 2022 21:09:39 -0400 Subject: Add UpdateManifest site type. Adds the UpdateManifest site key and associated client. This required some additional features in the existing update machinery. Each "version" can now (optionally) have its own download URL. Mod Page objects can now specify that subkey matching (for that page) should be "strict". A strict subkey match does not fall back to matching with no subkey if a subkey was provided but produced no versions. It also strips the leading '@' from the subkey. IModDownload objects are now responsible for deciding whether a subkey matches or not. The default behavior is unchanged, but this allows different mod sites to have different rules for subkey matching (which the UpdateManifest mod site uses to force exact matches). --- src/SMAPI.Web/Framework/IModDownload.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/SMAPI.Web/Framework/IModDownload.cs') diff --git a/src/SMAPI.Web/Framework/IModDownload.cs b/src/SMAPI.Web/Framework/IModDownload.cs index 13739f8f..b0e9a664 100644 --- a/src/SMAPI.Web/Framework/IModDownload.cs +++ b/src/SMAPI.Web/Framework/IModDownload.cs @@ -15,9 +15,12 @@ namespace StardewModdingAPI.Web.Framework /// The download's file version. string? Version { get; } - /// Return true iff the subkey matches this download + /// This download's URL (if it has a URL that is different from the containing mod page's URL). + string? Url { get; } + + /// Return iff the subkey matches this download /// the subkey - /// true if matches this download, otherwise false + /// if matches this download, otherwise bool MatchesSubkey(string subkey); } } -- cgit