mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Merge pull request #431 from Jorolf/moarOptions
SelectRandom doesnt select hidden groups now
This commit is contained in:
commit
7db319d384
@ -356,10 +356,10 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public void SelectRandom()
|
public void SelectRandom()
|
||||||
{
|
{
|
||||||
if (groups.Count < 1)
|
List<BeatmapGroup> visibleGroups = this.groups.Where((BeatmapGroup selectGroup) => selectGroup.State != BeatmapGroupState.Hidden).ToList();
|
||||||
|
if (visibleGroups.Count < 1)
|
||||||
return;
|
return;
|
||||||
|
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
|
||||||
BeatmapGroup group = groups[RNG.Next(groups.Count)];
|
|
||||||
BeatmapPanel panel = group?.BeatmapPanels.First();
|
BeatmapPanel panel = group?.BeatmapPanels.First();
|
||||||
|
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user