fix linq logic

This commit is contained in:
cdwcgt 2024-05-04 20:11:59 +08:00
parent 6af30a3d45
commit fe30ca3d39
No known key found for this signature in database
GPG Key ID: F8460DACCE48E8BD
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,10 @@ protected override void LoadComplete()
protected override void Select()
{
var selectedSystemMods = selectedMods.Value.Where(mod => mod.Type == ModType.System
&& !mod.IncompatibleMods.Any(t => Preset.Value.Mods.Any(m => m.GetType() == t)));
var selectedSystemMods = selectedMods.Value.Where(mod => mod.Type == ModType.System &&
!mod.IncompatibleMods.Any(t => Preset.Value.Mods.Any(t.IsInstanceOfType)));
// will also have the side effect of activating the preset (see `updateActiveState()`).
selectedMods.Value = Preset.Value.Mods.Concat(selectedSystemMods).ToArray();
}