summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-09 10:43:05 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-09 10:43:05 -0400
commitd8d8cac2d89c27c6d28be444cebaabf0e2077a53 (patch)
tree14f961f69d4795943146404c04fb50c1bd51cead /src/SMAPI/Framework/ModLoading
parenta500812e88ac5a8acdd9732963e6fae95c0a73e6 (diff)
downloadSMAPI-d8d8cac2d89c27c6d28be444cebaabf0e2077a53.tar.gz
SMAPI-d8d8cac2d89c27c6d28be444cebaabf0e2077a53.tar.bz2
SMAPI-d8d8cac2d89c27c6d28be444cebaabf0e2077a53.zip
simplify logged paranoid warnings
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
index 0e90362e..30701552 100644
--- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
@@ -215,13 +215,14 @@ namespace StardewModdingAPI.Framework.ModLoading
return this.GetUpdateKeys(validOnly: true).Any();
}
- /// <summary>Get whether the mod has a given warning and it hasn't been suppressed in the <see cref="DataRecord"/>.</summary>
- /// <param name="warning">The warning to check.</param>
- public bool HasUnsuppressWarning(ModWarning warning)
+ /// <summary>Get whether the mod has any of the given warnings which haven't been suppressed in the <see cref="IModMetadata.DataRecord"/>.</summary>
+ /// <param name="warnings">The warnings to check.</param>
+ public bool HasUnsuppressedWarnings(params ModWarning[] warnings)
{
- return
+ return warnings.Any(warning =>
this.Warnings.HasFlag(warning)
- && (this.DataRecord?.DataRecord == null || !this.DataRecord.DataRecord.SuppressWarnings.HasFlag(warning));
+ && (this.DataRecord?.DataRecord == null || !this.DataRecord.DataRecord.SuppressWarnings.HasFlag(warning))
+ );
}
/// <summary>Get a relative path which includes the root folder name.</summary>