Add ability to lookup mod from a type specification

This commit is contained in:
Dean Herbert
2021-09-09 16:46:24 +09:00
parent 4d0530ca9d
commit 2edb851008
7 changed files with 32 additions and 7 deletions

View File

@ -67,7 +67,7 @@ namespace osu.Game.Tests.Visual
if (!AllowFail)
{
var noFailMod = ruleset.GetAllMods().FirstOrDefault(m => m is ModNoFail);
var noFailMod = ruleset.GetMod<ModNoFail>();
if (noFailMod != null)
SelectedMods.Value = new[] { noFailMod };
}