diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-26 18:28:55 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-06-26 18:28:55 -0400 |
commit | 929e2642409ce50efd77f7b27edf30fd3ea769b1 (patch) | |
tree | 7fd53c6966855b604d49ab7647ae702f70a2b607 /src/SMAPI/Framework/ModLoading | |
parent | f9f098fbf818d6d9f77f539633ac7d1ed21594fe (diff) | |
download | SMAPI-929e2642409ce50efd77f7b27edf30fd3ea769b1.tar.gz SMAPI-929e2642409ce50efd77f7b27edf30fd3ea769b1.tar.bz2 SMAPI-929e2642409ce50efd77f7b27edf30fd3ea769b1.zip |
fix update checks failing when some mods don't have a mod ID
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModMetadata.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs index 02a77778..3a412009 100644 --- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs +++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs @@ -133,6 +133,14 @@ namespace StardewModdingAPI.Framework.ModLoading return this.Manifest != null; } + /// <summary>Whether the mod has an ID (regardless of whether the ID is valid or the mod itself was loaded).</summary> + public bool HasID() + { + return + this.HasManifest() + && !string.IsNullOrWhiteSpace(this.Manifest.UniqueID); + } + /// <summary>Whether the mod has at least one update key set.</summary> public bool HasUpdateKeys() { |