diff options
author | Dan Volchek <volchek2@illinois.edu> | 2018-06-10 13:15:53 -0700 |
---|---|---|
committer | Dan Volchek <volchek2@illinois.edu> | 2018-06-10 13:15:53 -0700 |
commit | 5b9e365b5d252e2d1e957303c6b06fa1b3ae2f14 (patch) | |
tree | e034c3c88f71ff1dbd296909bbd66d7471382ad7 /src/SMAPI/Framework/IModMetadata.cs | |
parent | 235d67623de648499db521606e4b9033d35388e5 (diff) | |
download | SMAPI-5b9e365b5d252e2d1e957303c6b06fa1b3ae2f14.tar.gz SMAPI-5b9e365b5d252e2d1e957303c6b06fa1b3ae2f14.tar.bz2 SMAPI-5b9e365b5d252e2d1e957303c6b06fa1b3ae2f14.zip |
add version info to ModMetadata, change update checking to consider preview versions
Diffstat (limited to 'src/SMAPI/Framework/IModMetadata.cs')
-rw-r--r-- | src/SMAPI/Framework/IModMetadata.cs | 17 |
1 files changed, 17 insertions, 0 deletions
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 /// <summary>Whether the mod is a content pack.</summary> bool IsContentPack { get; } + /// <summary>The latest version of the mod.</summary> + ISemanticVersion LatestVersion { get; } + + /// <summary>The latest preview version of the mod, if any.</summary> + ISemanticVersion LatestPreviewVersion { get; } + + /// <summary>The error checking for updates for this mod, if any.</summary> + string UpdateCheckError { get; } /********* ** Public methods @@ -72,6 +80,15 @@ namespace StardewModdingAPI.Framework /// <param name="api">The mod-provided API.</param> IModMetadata SetApi(object api); + /// <summary>Set the update status, indicating no errors happened.</summary> + /// <param name="latestVersion">The latest version.</param> + /// <param name="latestPreviewVersion">The latest preview version.</param> + IModMetadata SetUpdateStatus(ISemanticVersion latestVersion, ISemanticVersion latestPreviewVersion); + + /// <summary>Set the update status, indicating an error happened.</summary> + /// <param name="updateCheckError">The error checking for updates, if any.</param> + IModMetadata SetUpdateStatus(string updateCheckError); + /// <summary>Whether the mod manifest was loaded (regardless of whether the mod itself was loaded).</summary> bool HasManifest(); |