diff options
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs')
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs | 29 |
1 files changed, 29 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..0587e09d --- /dev/null +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiDataOverrideEntry.cs @@ -0,0 +1,29 @@ +#nullable enable + +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; } = new string[0]; + + /// <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; + } +} |