summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/ModMetadata.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-11-04 23:18:55 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-11-04 23:18:55 -0500
commite8276166c3e8d1a0b3a976ef29a00f8e1569cc72 (patch)
treea78c44e929ff1de70d20b012385c418aea7e78a6 /src/SMAPI/Framework/ModLoading/ModMetadata.cs
parent688ee69ee64e03aee7a693e6c15092daf229ac5e (diff)
parentb4a5b3829f0f738e5b7e05048068eaec9d2d01d1 (diff)
downloadSMAPI-e8276166c3e8d1a0b3a976ef29a00f8e1569cc72.tar.gz
SMAPI-e8276166c3e8d1a0b3a976ef29a00f8e1569cc72.tar.bz2
SMAPI-e8276166c3e8d1a0b3a976ef29a00f8e1569cc72.zip
Merge branch 'add-multiplayer-sync' into develop
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
index 04aa679b..0cb62a75 100644
--- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
@@ -153,6 +153,15 @@ namespace StardewModdingAPI.Framework.ModLoading
&& !string.IsNullOrWhiteSpace(this.Manifest.UniqueID);
}
+ /// <summary>Whether the mod has the given ID.</summary>
+ /// <param name="id">The mod ID to check.</param>
+ public bool HasID(string id)
+ {
+ return
+ this.HasID()
+ && string.Equals(this.Manifest.UniqueID.Trim(), id?.Trim(), StringComparison.InvariantCultureIgnoreCase);
+ }
+
/// <summary>Get the defined update keys.</summary>
/// <param name="validOnly">Only return valid update keys.</param>
public IEnumerable<UpdateKey> GetUpdateKeys(bool validOnly = false)