mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Simplify custom filter criteria retrieval
This commit is contained in:
parent
f00089846b
commit
12b7d9e06d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user