mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Make OnlineStatus use OptionalRange
This commit is contained in:
parent
d7831d8f5d
commit
7683f7ff23
@ -37,7 +37,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
match &= criteria.BPM.IsInRange(Beatmap.BPM);
|
||||
|
||||
match &= criteria.BeatDivisor.IsInRange(Beatmap.BeatDivisor);
|
||||
match &= !criteria.OnlineStatus.HasValue || criteria.OnlineStatus == Beatmap.Status;
|
||||
match &= criteria.OnlineStatus.IsInRange(Beatmap.Status);
|
||||
|
||||
if (match)
|
||||
foreach (var criteriaTerm in criteria.SearchTerms)
|
||||
|
@ -230,8 +230,8 @@ namespace osu.Game.Screens.Select
|
||||
updateCriteriaRange(ref criteria.BeatDivisor, op, divisor);
|
||||
break;
|
||||
|
||||
case "status" when op == ":" && Enum.TryParse<BeatmapSetOnlineStatus>(value, ignoreCase: true, out var statusValue):
|
||||
criteria.OnlineStatus = statusValue;
|
||||
case "status" when Enum.TryParse<BeatmapSetOnlineStatus>(value, true, out var statusValue):
|
||||
updateCriteriaRange(ref criteria.OnlineStatus, op, statusValue);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,7 @@ namespace osu.Game.Screens.Select
|
||||
public OptionalRange<double> Length;
|
||||
public OptionalRange<double> BPM;
|
||||
public OptionalRange<int> BeatDivisor;
|
||||
|
||||
public BeatmapSetOnlineStatus? OnlineStatus;
|
||||
public OptionalRange<BeatmapSetOnlineStatus> OnlineStatus;
|
||||
|
||||
public string[] SearchTerms = Array.Empty<string>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user