diff options
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModMetadata.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs index e793b0cd..18d2b112 100644 --- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs +++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs @@ -38,6 +38,9 @@ namespace StardewModdingAPI.Framework.ModLoading public ModMetadataStatus Status { get; private set; } /// <inheritdoc /> + public ModFailReason? FailReason { get; private set; } + + /// <inheritdoc /> public ModWarning Warnings { get; private set; } /// <inheritdoc /> @@ -93,9 +96,18 @@ namespace StardewModdingAPI.Framework.ModLoading } /// <inheritdoc /> - public IModMetadata SetStatus(ModMetadataStatus status, string error = null, string errorDetails = null) + public IModMetadata SetStatusFound() + { + this.SetStatus(ModMetadataStatus.Found, ModFailReason.Incompatible, null); + this.FailReason = null; + return this; + } + + /// <inheritdoc /> + public IModMetadata SetStatus(ModMetadataStatus status, ModFailReason reason, string error, string errorDetails = null) { this.Status = status; + this.FailReason = reason; this.Error = error; this.ErrorDetails = errorDetails; return this; |