1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Merge pull request #17286 from frenzibyte/rewrite-mod-instantiation-method

Update mod instantiation utility method inline with `APIMod.ToMod` changes
This commit is contained in:
Dan Balasescu 2022-03-17 14:19:55 +09:00 committed by GitHub
commit e8886e4c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;