log error if mod files are detected directly under Mods folder
This commit is contained in:
parent
4d9384b828
commit
5ab87efaa0
|
@ -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!).
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue