mirror of https://github.com/ppy/osu
Update mod instantiation utility method inline with `APIMod.ToMod` changes
This commit is contained in:
parent
83189d1f07
commit
e0a06bf5d9
|
@ -166,15 +166,15 @@ public static bool InstantiateValidModsForRuleset(Ruleset ruleset, IEnumerable<A
|
|||
|
||||
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