diff options
-rw-r--r-- | docs/release-notes.md | 1 | ||||
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 7526e655..1734ca2d 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -9,6 +9,7 @@ ## Upcoming release * For players: + * Added error message if mod files are detected directly under `Mods` (instead of each mod having its own subfolder). * SMAPI now sets a success/error code when the game exits. _This is used by your OS (like Windows) to decide whether to keep the console window open when the game ends._ * Fixed SMAPI on Windows applying different DPI awareness settings than the game (thanks to spacechase0!). diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index cbb559c1..0f86ed6b 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -405,7 +405,14 @@ namespace StardewModdingAPI.Framework { string[] looseFiles = new DirectoryInfo(this.ModsPath).GetFiles().Select(p => p.Name).ToArray(); if (looseFiles.Any()) + { + if (looseFiles.Any(name => name.Equals("manifest.json", StringComparison.OrdinalIgnoreCase) || name.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))) + { + this.Monitor.Log($"Detected mod files directly inside the '{Path.GetFileName(this.ModsPath)}' folder. These will be ignored. Each mod must have its own subfolder instead.", LogLevel.Error); + } + this.Monitor.Log($" Ignored loose files: {string.Join(", ", looseFiles.OrderBy(p => p, StringComparer.OrdinalIgnoreCase))}"); + } } // load manifests |