diff --git a/ModAssistant/Pages/Mods.xaml.cs b/ModAssistant/Pages/Mods.xaml.cs index 827dc3c3..f45230ec 100644 --- a/ModAssistant/Pages/Mods.xaml.cs +++ b/ModAssistant/Pages/Mods.xaml.cs @@ -28,6 +28,7 @@ public sealed partial class Mods : Page public Mod[] ModsList; public Mod[] AllModsList; public static List InstalledMods = new List(); + public static List LibsToMatch = new List(); public List CategoryNames = new List(); public CollectionView view; public bool PendingChanges; @@ -175,12 +176,28 @@ private void CheckInstallDir(string directory) foreach (string file in Directory.GetFileSystemEntries(Path.Combine(App.BeatSaberInstallDirectory, directory))) { - if (File.Exists(file) && Path.GetExtension(file) == ".dll" || Path.GetExtension(file) == ".manifest") + string fileExtension = Path.GetExtension(file); + + if (File.Exists(file) && (fileExtension == ".dll" || fileExtension == ".manifest")) { Mod mod = GetModFromHash(Utils.CalculateMD5(file)); if (mod != null) { - AddDetectedMod(mod); + if (fileExtension == ".manifest") + { + LibsToMatch.Add(mod); + } + else + { + if (directory.Contains("Libs")) + { + if (!LibsToMatch.Contains(mod)) continue; + + LibsToMatch.Remove(mod); + } + + AddDetectedMod(mod); + } } } }