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:
commit
e8886e4c50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user