Fix test failures

This commit is contained in:
Bartłomiej Dach 2023-10-30 15:48:00 +01:00
parent 21a4da463b
commit ef555ed0cf
No known key found for this signature in database
3 changed files with 5 additions and 3 deletions

View File

@ -147,11 +147,11 @@ public void TestNotAllowedThroughBaseType()
new Mod[] { new OsuModDeflate(), new OsuModApproachDifferent() },
new[] { typeof(OsuModDeflate), typeof(OsuModApproachDifferent) }
},
// system mod.
// system mod not applicable in lazer.
new object[]
{
new Mod[] { new OsuModHidden(), new OsuModTouchDevice() },
new[] { typeof(OsuModTouchDevice) }
new Mod[] { new OsuModHidden(), new ModScoreV2() },
new[] { typeof(ModScoreV2) }
},
// multi mod.
new object[]

View File

@ -133,6 +133,7 @@ private void createFreeModSelect()
private bool assertAllAvailableModsSelected()
{
var allAvailableMods = availableMods.Value
.Where(pair => pair.Key != ModType.System)
.SelectMany(pair => pair.Value)
.Where(mod => mod.UserPlayable && mod.HasImplementation)
.ToList();

View File

@ -41,6 +41,7 @@ protected override void LoadComplete()
private void updateEnabledState()
{
Enabled.Value = availableMods.Value
.Where(pair => pair.Key != ModType.System)
.SelectMany(pair => pair.Value)
.Any(modState => !modState.Active.Value && modState.Visible);
}