1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 20:32:55 +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; private Bindable<GroupMode> groupMode;
[Resolved]
private RulesetStore rulesets { get; set; }
public FilterCriteria CreateCriteria() public FilterCriteria CreateCriteria()
{ {
Debug.Assert(ruleset.Value.ID != null); Debug.Assert(ruleset.Value.ID != null);
@ -59,7 +56,7 @@ namespace osu.Game.Screens.Select
if (!maximumStars.IsDefault) if (!maximumStars.IsDefault)
criteria.UserStarDifficulty.Max = maximumStars.Value; 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); FilterQueryParser.ApplyQueries(criteria, query);
return criteria; return criteria;