diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-10-02 16:40:23 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-10-02 16:40:23 -0400 |
commit | b5c88d87d2cb1739585651e02513fef73dfc0e27 (patch) | |
tree | cd8a2afda5ee8cccc806574613f6de4073970c7a /src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs | |
parent | 0888f71a5c7fe2bbf815409a70834ac85013c7f8 (diff) | |
download | SMAPI-b5c88d87d2cb1739585651e02513fef73dfc0e27.tar.gz SMAPI-b5c88d87d2cb1739585651e02513fef73dfc0e27.tar.bz2 SMAPI-b5c88d87d2cb1739585651e02513fef73dfc0e27.zip |
add support for unified mod data overrides on the wiki
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs')
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs new file mode 100644 index 00000000..e5ee81be --- /dev/null +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs @@ -0,0 +1,31 @@ +#nullable enable + +using System; + +namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki +{ + /// <summary>The data overrides to apply to matching mods.</summary> + public class WikiDataOverrideEntry + { + /********* + ** Accessors + *********/ + /// <summary>The unique mod IDs for the mods to override.</summary> + public string[] Ids { get; set; } = Array.Empty<string>(); + + /// <summary>Maps local versions to a semantic version for update checks.</summary> + public ChangeDescriptor? ChangeLocalVersions { get; set; } + + /// <summary>Maps remote versions to a semantic version for update checks.</summary> + public ChangeDescriptor? ChangeRemoteVersions { get; set; } + + /// <summary>Update keys to add (optionally prefixed by '+'), remove (prefixed by '-'), or replace.</summary> + public ChangeDescriptor? ChangeUpdateKeys { get; set; } + + /// <summary>Whether the entry has any changes.</summary> + public bool HasChanges => + this.ChangeLocalVersions?.HasChanges == true + || this.ChangeRemoteVersions?.HasChanges == true + || this.ChangeUpdateKeys?.HasChanges == true; + } +} |