diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-27 22:08:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-27 22:08:00 -0400 |
commit | 88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac (patch) | |
tree | 5ce2a537117a883d661434a75c62efe6c07b75d1 /src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs | |
parent | 8231d05a33d8783093dd993cbe004239039fe8e8 (diff) | |
download | SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.tar.gz SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.tar.bz2 SMAPI-88ea1eae13f3c5e3bfcedfb2ac9139c6dc829bac.zip |
add support for ignored mod folders
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs')
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs index d2fea9e2..bb467b36 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/ModScanning/ModFolder.cs @@ -24,6 +24,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning /// <summary>The error which occurred parsing the manifest, if any.</summary> public string ManifestParseError { get; } + /// <summary>Whether the mod should be loaded by default. This is <c>false</c> if it was found within a folder whose name starts with a dot.</summary> + public bool ShouldBeLoaded { get; } + /********* ** Public methods @@ -33,12 +36,14 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning /// <param name="directory">The folder containing the mod's manifest.json.</param> /// <param name="manifest">The mod manifest.</param> /// <param name="manifestParseError">The error which occurred parsing the manifest, if any.</param> - public ModFolder(DirectoryInfo root, DirectoryInfo directory, Manifest manifest, string manifestParseError = null) + /// <param name="shouldBeLoaded">Whether the mod should be loaded by default. This should be <c>false</c> if it was found within a folder whose name starts with a dot.</param> + public ModFolder(DirectoryInfo root, DirectoryInfo directory, Manifest manifest, string manifestParseError = null, bool shouldBeLoaded = true) { // save info this.Directory = directory; this.Manifest = manifest; this.ManifestParseError = manifestParseError; + this.ShouldBeLoaded = shouldBeLoaded; // set display name this.DisplayName = manifest?.Name; |