avoid resolving empty folders.

This commit is contained in:
atravita-mods 2023-03-23 22:04:21 -04:00 committed by Jesse Plamondon-Willard
parent 7b5566d075
commit 58ccaf9a1e
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 2 additions and 1 deletions

View File

@ -178,6 +178,7 @@ namespace StardewModdingAPI.Framework.ModLoading
string[] lateArray = modIdsToLoadLate.ToArray();
return mods
.Where(mod => mod.FailReason is not null)
.OrderBy(mod =>
{
string id = mod.Manifest.UniqueID;

View File

@ -433,7 +433,7 @@ namespace StardewModdingAPI.Framework
// apply load order customizations
if (this.Settings.ModsToLoadEarly.Any() || this.Settings.ModsToLoadLate.Any())
{
HashSet<string> installedIds = new HashSet<string>(mods.Select(p => p.Manifest.UniqueID), StringComparer.OrdinalIgnoreCase);
HashSet<string> installedIds = new HashSet<string>(mods.Where(p => p.FailReason is null).Select(p => p.Manifest.UniqueID), StringComparer.OrdinalIgnoreCase);
string[] missingEarlyMods = this.Settings.ModsToLoadEarly.Where(id => !installedIds.Contains(id)).OrderBy(p => p, StringComparer.OrdinalIgnoreCase).ToArray();
string[] missingLateMods = this.Settings.ModsToLoadLate.Where(id => !installedIds.Contains(id)).OrderBy(p => p, StringComparer.OrdinalIgnoreCase).ToArray();