From 5b9e365b5d252e2d1e957303c6b06fa1b3ae2f14 Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Sun, 10 Jun 2018 13:15:53 -0700 Subject: add version info to ModMetadata, change update checking to consider preview versions --- src/SMAPI/Framework/IModMetadata.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/SMAPI/Framework/IModMetadata.cs') diff --git a/src/SMAPI/Framework/IModMetadata.cs b/src/SMAPI/Framework/IModMetadata.cs index c0d6408d..673c5b2e 100644 --- a/src/SMAPI/Framework/IModMetadata.cs +++ b/src/SMAPI/Framework/IModMetadata.cs @@ -45,6 +45,14 @@ namespace StardewModdingAPI.Framework /// Whether the mod is a content pack. bool IsContentPack { get; } + /// The latest version of the mod. + ISemanticVersion LatestVersion { get; } + + /// The latest preview version of the mod, if any. + ISemanticVersion LatestPreviewVersion { get; } + + /// The error checking for updates for this mod, if any. + string UpdateCheckError { get; } /********* ** Public methods @@ -72,6 +80,15 @@ namespace StardewModdingAPI.Framework /// The mod-provided API. IModMetadata SetApi(object api); + /// Set the update status, indicating no errors happened. + /// The latest version. + /// The latest preview version. + IModMetadata SetUpdateStatus(ISemanticVersion latestVersion, ISemanticVersion latestPreviewVersion); + + /// Set the update status, indicating an error happened. + /// The error checking for updates, if any. + IModMetadata SetUpdateStatus(string updateCheckError); + /// Whether the mod manifest was loaded (regardless of whether the mod itself was loaded). bool HasManifest(); -- cgit