Refactor exposed mod retrieval methods for better safety

This commit is contained in:
Dean Herbert
2021-09-10 11:09:13 +09:00
parent ce6b022a90
commit cf633973a9
19 changed files with 75 additions and 64 deletions

View File

@ -54,7 +54,7 @@ namespace osu.Game.Overlays.BeatmapSet
return;
modsContainer.Add(new ModButton(new ModNoMod()));
modsContainer.AddRange(ruleset.NewValue.CreateInstance().GetAllModsForReference().Where(m => m.UserPlayable).Select(m => new ModButton(m)));
modsContainer.AddRange(ruleset.NewValue.CreateInstance().AllMods.Where(m => m.UserPlayable).Select(m => new ModButton(m.CreateInstance())));
modsContainer.ForEach(button =>
{