1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Update mod instantiation utility method inline with APIMod.ToMod changes

This commit is contained in:
Salman Ahmed 2022-03-17 06:28:10 +03:00
parent 83189d1f07
commit e0a06bf5d9

View File

@ -166,15 +166,15 @@ namespace osu.Game.Utils
foreach (var apiMod in proposedMods)
{
try
{
// will throw if invalid
valid.Add(apiMod.ToMod(ruleset));
}
catch
var mod = apiMod.ToMod(ruleset);
if (mod is UnknownMod)
{
proposedWereValid = false;
continue;
}
valid.Add(mod);
}
return proposedWereValid;