1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:33:20 +08:00

Simplify custom filter criteria retrieval

This commit is contained in:
Bartłomiej Dach 2021-03-06 12:16:01 +01:00
parent f00089846b
commit 12b7d9e06d

View File

@ -35,9 +35,6 @@ namespace osu.Game.Screens.Select
private Bindable<GroupMode> groupMode;
[Resolved]
private RulesetStore rulesets { get; set; }
public FilterCriteria CreateCriteria()
{
Debug.Assert(ruleset.Value.ID != null);
@ -59,7 +56,7 @@ namespace osu.Game.Screens.Select
if (!maximumStars.IsDefault)
criteria.UserStarDifficulty.Max = maximumStars.Value;
criteria.RulesetCriteria = rulesets.GetRuleset(ruleset.Value.ID.Value).CreateInstance().CreateRulesetFilterCriteria();
criteria.RulesetCriteria = ruleset.Value.CreateInstance().CreateRulesetFilterCriteria();
FilterQueryParser.ApplyQueries(criteria, query);
return criteria;