diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-19 22:10:15 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-19 22:10:15 -0400 |
commit | d401aff3307f6e2e1641610fdd912b572d6b04c1 (patch) | |
tree | 361db0c08914b34a58ac985aeacd108c8b932ae0 /src/SMAPI/Framework/ModLoading | |
parent | 4a05cd09b66a9ec37522aa656ab0814095ab6d23 (diff) | |
download | SMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.tar.gz SMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.tar.bz2 SMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.zip |
rewrite update checks (#551)
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModMetadata.cs | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs index 88d2770c..02a77778 100644 --- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs +++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using StardewModdingAPI.Framework.ModData; -using StardewModdingAPI.Framework.ModUpdateChecking; +using StardewModdingAPI.Toolkit.Framework.Clients.WebApi; namespace StardewModdingAPI.Framework.ModLoading { @@ -44,11 +44,8 @@ namespace StardewModdingAPI.Framework.ModLoading /// <summary>The mod-provided API (if any).</summary> public object Api { get; private set; } - /// <summary>The update status of this mod (if any).</summary> - public ModUpdateStatus UpdateStatus { get; private set; } - - /// <summary>The preview update status of this mod (if any).</summary> - public ModUpdateStatus PreviewUpdateStatus { get; private set; } + /// <summary>The update-check metadata for this mod (if any).</summary> + public ModEntryModel UpdateCheckData { get; private set; } /// <summary>Whether the mod is a content pack.</summary> public bool IsContentPack => this.Manifest?.ContentPackFor != null; @@ -122,19 +119,11 @@ namespace StardewModdingAPI.Framework.ModLoading return this; } - /// <summary>Set the update status.</summary> - /// <param name="updateStatus">The mod update status.</param> - public IModMetadata SetUpdateStatus(ModUpdateStatus updateStatus) - { - this.UpdateStatus = updateStatus; - return this; - } - - /// <summary>Set the preview update status.</summary> - /// <param name="previewUpdateStatus">The mod preview update status.</param> - public IModMetadata SetPreviewUpdateStatus(ModUpdateStatus previewUpdateStatus) + /// <summary>Set the update-check metadata for this mod.</summary> + /// <param name="data">The update-check metadata.</param> + public IModMetadata SetUpdateData(ModEntryModel data) { - this.PreviewUpdateStatus = previewUpdateStatus; + this.UpdateCheckData = data; return this; } |