summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/IModDownload.cs
diff options
context:
space:
mode:
authorJamie Taylor <Jamie.Taylor@pobox.com>2022-10-01 21:09:39 -0400
committerJamie Taylor <Jamie.Taylor@pobox.com>2022-10-01 21:30:14 -0400
commit83aec980b3ee739fb4bc251217556b3ae44f741b (patch)
treeafa8c91eb20cf56ed2cb35563ba3bd2d1e4c8a46 /src/SMAPI.Web/Framework/IModDownload.cs
parent6d4eed56b1d80d02db773b0cd2f372baec6b2d1b (diff)
downloadSMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.tar.gz
SMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.tar.bz2
SMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.zip
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).
Diffstat (limited to 'src/SMAPI.Web/Framework/IModDownload.cs')
-rw-r--r--src/SMAPI.Web/Framework/IModDownload.cs7
1 files changed, 5 insertions, 2 deletions
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
/// <summary>The download's file version.</summary>
string? Version { get; }
- /// <summary>Return <c>true</c> iff the subkey matches this download</summary>
+ /// <summary>This download's URL (if it has a URL that is different from the containing mod page's URL).</summary>
+ string? Url { get; }
+
+ /// <summary>Return <see langword="true"/> iff the subkey matches this download</summary>
/// <param name="subkey">the subkey</param>
- /// <returns><c>true</c> if <paramref name="subkey"/> matches this download, otherwise <c>false</c></returns>
+ /// <returns><see langword="true"/> if <paramref name="subkey"/> matches this download, otherwise <see langword="false"/></returns>
bool MatchesSubkey(string subkey);
}
}