diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-08-24 17:49:12 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-08-24 17:49:12 -0400 |
commit | 1d5017f1197862d0d9c9f7aa4e13216cad3746d6 (patch) | |
tree | cfd8c56f635c997f906c84af6c95ec7ecd312a8f /src/SMAPI/Framework/ModLoading | |
parent | a1bc96d365dc40275f198668d3f4c09bd7a92613 (diff) | |
download | SMAPI-1d5017f1197862d0d9c9f7aa4e13216cad3746d6.tar.gz SMAPI-1d5017f1197862d0d9c9f7aa4e13216cad3746d6.tar.bz2 SMAPI-1d5017f1197862d0d9c9f7aa4e13216cad3746d6.zip |
fix broken mods with no ID listed as duplicate
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index c5648c74..5f1fbe4b 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -218,12 +218,12 @@ namespace StardewModdingAPI.Framework.ModLoading { var duplicatesByID = mods .GroupBy(mod => mod.Manifest?.UniqueID?.Trim(), mod => mod, StringComparer.OrdinalIgnoreCase) - .Where(p => p.Count() > 1); + .Where(p => !string.IsNullOrEmpty(p.Key) && p.Count() > 1); foreach (var group in duplicatesByID) { foreach (IModMetadata mod in group) { - if (mod.Status == ModMetadataStatus.Failed && mod.FailReason != ModFailReason.InvalidManifest) + if (mod.Status == ModMetadataStatus.Failed && mod.FailReason is not (ModFailReason.InvalidManifest or ModFailReason.LoadFailed or ModFailReason.MissingDependencies)) continue; string folderList = string.Join(", ", group.Select(p => p.GetRelativePathWithRoot()).OrderBy(p => p)); |