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