mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Update mod instantiation utility method inline with APIMod.ToMod
changes
This commit is contained in:
parent
83189d1f07
commit
e0a06bf5d9
@ -166,15 +166,15 @@ namespace osu.Game.Utils
|
|||||||
|
|
||||||
foreach (var apiMod in proposedMods)
|
foreach (var apiMod in proposedMods)
|
||||||
{
|
{
|
||||||
try
|
var mod = apiMod.ToMod(ruleset);
|
||||||
{
|
|
||||||
// will throw if invalid
|
if (mod is UnknownMod)
|
||||||
valid.Add(apiMod.ToMod(ruleset));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
{
|
||||||
proposedWereValid = false;
|
proposedWereValid = false;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
valid.Add(mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
return proposedWereValid;
|
return proposedWereValid;
|
||||||
|
Loading…
Reference in New Issue
Block a user