Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions ModAssistant/Pages/Mods.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed partial class Mods : Page
public Mod[] ModsList;
public Mod[] AllModsList;
public static List<Mod> InstalledMods = new List<Mod>();
public static List<Mod> LibsToMatch = new List<Mod>();
public List<string> CategoryNames = new List<string>();
public CollectionView view;
public bool PendingChanges;
Expand Down Expand Up @@ -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);
}
}
}
}
Expand Down