mirror of
https://github.com/ppy/osu
synced 2025-01-20 21:10:49 +00:00
Merge branch 'match-playlist' into match-detail-area
This commit is contained in:
commit
e6676ffa51
@ -5,18 +5,16 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Multi;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
@ -30,12 +28,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
typeof(DrawableRoomPlaylistItem)
|
||||
};
|
||||
|
||||
[Resolved]
|
||||
private BeatmapManager beatmapManager { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private RulesetStore rulesetStore { get; set; }
|
||||
|
||||
private DrawableRoomPlaylist playlist;
|
||||
|
||||
[Test]
|
||||
@ -218,22 +210,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
Size = new Vector2(500, 300)
|
||||
};
|
||||
|
||||
var beatmapSets = beatmapManager.GetAllUsableBeatmapSets();
|
||||
var rulesets = rulesetStore.AvailableRulesets.ToList();
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
var set = beatmapSets[RNG.Next(0, beatmapSets.Count)];
|
||||
var beatmap = set.Beatmaps[RNG.Next(0, set.Beatmaps.Count)];
|
||||
|
||||
beatmap.BeatmapSet = set;
|
||||
beatmap.Metadata = set.Metadata;
|
||||
|
||||
playlist.Items.Add(new PlaylistItem
|
||||
{
|
||||
ID = i,
|
||||
Beatmap = { Value = beatmap },
|
||||
Ruleset = { Value = rulesets[RNG.Next(0, rulesets.Count)] },
|
||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
||||
RequiredMods =
|
||||
{
|
||||
new OsuModHardRock(),
|
||||
|
Loading…
Reference in New Issue
Block a user