mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Use a counter instead of RNG
This commit is contained in:
@ -11,7 +11,6 @@ using osu.Game.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Utils;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
@ -22,6 +21,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
protected override bool UseOnlineAPI => true;
|
||||
|
||||
private int nextBeatmapSetId = 1;
|
||||
|
||||
public TestSceneBeatmapSetOverlay()
|
||||
{
|
||||
Add(overlay = new TestBeatmapSetOverlay());
|
||||
@ -323,8 +324,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
private BeatmapSetInfo getBeatmapSet()
|
||||
{
|
||||
var beatmapSet = CreateBeatmap(Ruleset.Value).BeatmapInfo.BeatmapSet;
|
||||
// Overlay doesn't reload if the same beatmap set is set.
|
||||
beatmapSet.OnlineBeatmapSetID = RNG.Next();
|
||||
// Make sure the overlay is reloaded (see `BeatmapSetInfo.Equals`).
|
||||
beatmapSet.OnlineBeatmapSetID = nextBeatmapSetId++;
|
||||
return beatmapSet;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user