diff options
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/GenericModPage.cs')
-rw-r--r-- | src/SMAPI.Web/Framework/Clients/GenericModPage.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/GenericModPage.cs b/src/SMAPI.Web/Framework/Clients/GenericModPage.cs index 5353c7e1..63ca5a95 100644 --- a/src/SMAPI.Web/Framework/Clients/GenericModPage.cs +++ b/src/SMAPI.Web/Framework/Clients/GenericModPage.cs @@ -40,6 +40,9 @@ namespace StardewModdingAPI.Web.Framework.Clients [MemberNotNullWhen(true, nameof(IModPage.Name), nameof(IModPage.Url))] public bool IsValid => this.Status == RemoteModStatus.Ok; + /// <summary>Whether this mod page requires update subkeys and does not allow matching downloads without them.</summary> + public bool RequireSubkey { get; set; } = false; + /********* ** Public methods @@ -79,5 +82,19 @@ namespace StardewModdingAPI.Web.Framework.Clients return this; } + + /// <summary>Get the mod name for an update subkey, if different from the mod page name.</summary> + /// <param name="subkey">The update subkey.</param> + public virtual string? GetName(string? subkey) + { + return this.Name; + } + + /// <summary>Get the mod page URL for an update subkey, if different from the mod page it was fetched from.</summary> + /// <param name="subkey">The update subkey.</param> + public virtual string? GetUrl(string? subkey) + { + return this.Url; + } } } |