Merge pull request #18751 from frenzibyte/tournament-beatmap

Improve tournament beatmap JSON storage using lightweight model
This commit is contained in:
Dean Herbert
2022-06-18 11:00:26 +09:00
committed by GitHub
16 changed files with 128 additions and 31 deletions

View File

@ -14,9 +14,9 @@ using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
using osu.Game.Extensions;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
using osu.Game.Screens.Menu;
using osu.Game.Tournament.Models;
using osuTK;
using osuTK.Graphics;
@ -24,14 +24,14 @@ namespace osu.Game.Tournament.Components
{
public class SongBar : CompositeDrawable
{
private APIBeatmap beatmap;
private TournamentBeatmap beatmap;
public const float HEIGHT = 145 / 2f;
[Resolved]
private IBindable<RulesetInfo> ruleset { get; set; }
public APIBeatmap Beatmap
public TournamentBeatmap Beatmap
{
set
{

View File

@ -14,7 +14,6 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Tournament.Models;
using osuTK.Graphics;
@ -22,7 +21,7 @@ namespace osu.Game.Tournament.Components
{
public class TournamentBeatmapPanel : CompositeDrawable
{
public readonly APIBeatmap Beatmap;
public readonly TournamentBeatmap Beatmap;
private readonly string mod;
@ -31,7 +30,7 @@ namespace osu.Game.Tournament.Components
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
private Box flash;
public TournamentBeatmapPanel(APIBeatmap beatmap, string mod = null)
public TournamentBeatmapPanel(TournamentBeatmap beatmap, string mod = null)
{
if (beatmap == null) throw new ArgumentNullException(nameof(beatmap));
@ -61,7 +60,7 @@ namespace osu.Game.Tournament.Components
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.5f),
OnlineInfo = Beatmap.BeatmapSet,
OnlineInfo = Beatmap,
},
new FillFlowContainer
{