Replace tournament beatmap storage type with lightweight model

This commit is contained in:
Salman Ahmed
2022-06-18 01:34:09 +03:00
parent 200b23c689
commit 9f97d1a7db
15 changed files with 29 additions and 31 deletions

View File

@ -42,7 +42,7 @@ namespace osu.Game.Tournament.Tests.Components
beatmap.Length = 123456;
beatmap.BPM = 133;
songBar.Beatmap = beatmap;
songBar.Beatmap = new TournamentBeatmap(beatmap);
});
AddStep("set mods to HR", () => songBar.Mods = LegacyMods.HardRock);
AddStep("set mods to DT", () => songBar.Mods = LegacyMods.DoubleTime);

View File

@ -10,6 +10,7 @@ using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Tests.Visual;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
namespace osu.Game.Tournament.Tests.Components
{
@ -32,7 +33,7 @@ namespace osu.Game.Tournament.Tests.Components
private void success(APIBeatmap beatmap)
{
Add(new TournamentBeatmapPanel(beatmap)
Add(new TournamentBeatmapPanel(new TournamentBeatmap(beatmap))
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre

View File

@ -11,6 +11,7 @@ using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osuTK;
namespace osu.Game.Tournament.Tests.Components
@ -53,7 +54,7 @@ namespace osu.Game.Tournament.Tests.Components
foreach (var mod in mods)
{
fillFlow.Add(new TournamentBeatmapPanel(beatmap, mod.Acronym)
fillFlow.Add(new TournamentBeatmapPanel(new TournamentBeatmap(beatmap), mod.Acronym)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre