summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
index e4ec7e3b..88d2770c 100644
--- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using StardewModdingAPI.Framework.ModData;
+using StardewModdingAPI.Framework.ModUpdateChecking;
namespace StardewModdingAPI.Framework.ModLoading
{
@@ -43,6 +44,12 @@ 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>Whether the mod is a content pack.</summary>
public bool IsContentPack => this.Manifest?.ContentPackFor != null;
@@ -115,6 +122,22 @@ 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)
+ {
+ this.PreviewUpdateStatus = previewUpdateStatus;
+ return this;
+ }
+
/// <summary>Whether the mod manifest was loaded (regardless of whether the mod itself was loaded).</summary>
public bool HasManifest()
{