summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-23 18:15:58 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-23 18:15:58 -0400
commit9cebd83cb968a61e809bd721056fd9fc17f3b5fe (patch)
tree89cc3b5e984b1fa187add02a23ff60861c0c3005 /src/SMAPI/Framework/ModLoading
parentfd6c7c73cc4fb192df98cb21fb42f47a5c40a379 (diff)
downloadSMAPI-9cebd83cb968a61e809bd721056fd9fc17f3b5fe.tar.gz
SMAPI-9cebd83cb968a61e809bd721056fd9fc17f3b5fe.tar.bz2
SMAPI-9cebd83cb968a61e809bd721056fd9fc17f3b5fe.zip
show update-key warnings before checking mod status, enable in non-dev mode
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
index af888b71..d3a33e7a 100644
--- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
@@ -104,11 +104,18 @@ namespace StardewModdingAPI.Framework.ModLoading
return this;
}
+ /// <summary>Whether the mod manifest was loaded (regardless of whether the mod itself was loaded).</summary>
+ public bool HasManifest()
+ {
+ return this.Manifest != null;
+ }
+
/// <summary>Whether the mod has at least one update key set.</summary>
public bool HasUpdateKeys()
{
return
- this.Manifest?.UpdateKeys != null
+ this.HasManifest()
+ && this.Manifest.UpdateKeys != null
&& this.Manifest.UpdateKeys.Any(key => !string.IsNullOrWhiteSpace(key));
}
}