mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Rename all usages of APIBeatmap
to beatmap
in tournament namespace
This commit is contained in:
@ -22,21 +22,21 @@ namespace osu.Game.Tournament.Components
|
||||
{
|
||||
public class SongBar : CompositeDrawable
|
||||
{
|
||||
private APIBeatmap beatmapInfo;
|
||||
private APIBeatmap beatmap;
|
||||
|
||||
public const float HEIGHT = 145 / 2f;
|
||||
|
||||
[Resolved]
|
||||
private IBindable<RulesetInfo> ruleset { get; set; }
|
||||
|
||||
public APIBeatmap BeatmapInfo
|
||||
public APIBeatmap Beatmap
|
||||
{
|
||||
set
|
||||
{
|
||||
if (beatmapInfo == value)
|
||||
if (beatmap == value)
|
||||
return;
|
||||
|
||||
beatmapInfo = value;
|
||||
beatmap = value;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@ -95,18 +95,18 @@ namespace osu.Game.Tournament.Components
|
||||
|
||||
private void update()
|
||||
{
|
||||
if (beatmapInfo == null)
|
||||
if (beatmap == null)
|
||||
{
|
||||
flow.Clear();
|
||||
return;
|
||||
}
|
||||
|
||||
double bpm = beatmapInfo.BPM; // TODO: check this works.
|
||||
double length = beatmapInfo.Length;
|
||||
double bpm = beatmap.BPM; // TODO: check this works.
|
||||
double length = beatmap.Length;
|
||||
string hardRockExtra = "";
|
||||
string srExtra = "";
|
||||
|
||||
float ar = beatmapInfo.Difficulty.ApproachRate;
|
||||
float ar = beatmap.Difficulty.ApproachRate;
|
||||
|
||||
if ((mods & LegacyMods.HardRock) > 0)
|
||||
{
|
||||
@ -132,9 +132,9 @@ namespace osu.Game.Tournament.Components
|
||||
default:
|
||||
stats = new (string heading, string content)[]
|
||||
{
|
||||
("CS", $"{beatmapInfo.Difficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||
("CS", $"{beatmap.Difficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||
("AR", $"{ar:0.#}{hardRockExtra}"),
|
||||
("OD", $"{beatmapInfo.Difficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||
("OD", $"{beatmap.Difficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||
};
|
||||
break;
|
||||
|
||||
@ -142,15 +142,15 @@ namespace osu.Game.Tournament.Components
|
||||
case 3:
|
||||
stats = new (string heading, string content)[]
|
||||
{
|
||||
("OD", $"{beatmapInfo.Difficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||
("HP", $"{beatmapInfo.Difficulty.DrainRate:0.#}{hardRockExtra}")
|
||||
("OD", $"{beatmap.Difficulty.OverallDifficulty:0.#}{hardRockExtra}"),
|
||||
("HP", $"{beatmap.Difficulty.DrainRate:0.#}{hardRockExtra}")
|
||||
};
|
||||
break;
|
||||
|
||||
case 2:
|
||||
stats = new (string heading, string content)[]
|
||||
{
|
||||
("CS", $"{beatmapInfo.Difficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||
("CS", $"{beatmap.Difficulty.CircleSize:0.#}{hardRockExtra}"),
|
||||
("AR", $"{ar:0.#}"),
|
||||
};
|
||||
break;
|
||||
@ -186,7 +186,7 @@ namespace osu.Game.Tournament.Components
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new DiffPiece(stats),
|
||||
new DiffPiece(("Star Rating", $"{beatmapInfo.StarRating:0.#}{srExtra}"))
|
||||
new DiffPiece(("Star Rating", $"{beatmap.StarRating:0.#}{srExtra}"))
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
@ -229,7 +229,7 @@ namespace osu.Game.Tournament.Components
|
||||
}
|
||||
}
|
||||
},
|
||||
new TournamentBeatmapPanel(beatmapInfo)
|
||||
new TournamentBeatmapPanel(beatmap)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Width = 0.5f,
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Tournament.Components
|
||||
{
|
||||
public class TournamentBeatmapPanel : CompositeDrawable
|
||||
{
|
||||
public readonly APIBeatmap BeatmapInfo;
|
||||
public readonly APIBeatmap Beatmap;
|
||||
|
||||
private readonly string mod;
|
||||
|
||||
@ -33,11 +33,11 @@ namespace osu.Game.Tournament.Components
|
||||
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
|
||||
private Box flash;
|
||||
|
||||
public TournamentBeatmapPanel(APIBeatmap beatmapInfo, string mod = null)
|
||||
public TournamentBeatmapPanel(APIBeatmap beatmap, string mod = null)
|
||||
{
|
||||
if (beatmapInfo == null) throw new ArgumentNullException(nameof(beatmapInfo));
|
||||
if (beatmap == null) throw new ArgumentNullException(nameof(beatmap));
|
||||
|
||||
BeatmapInfo = beatmapInfo;
|
||||
Beatmap = beatmap;
|
||||
this.mod = mod;
|
||||
|
||||
Width = 400;
|
||||
@ -63,7 +63,7 @@ namespace osu.Game.Tournament.Components
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.Gray(0.5f),
|
||||
BeatmapSet = BeatmapInfo.BeatmapSet,
|
||||
BeatmapSet = Beatmap.BeatmapSet,
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Tournament.Components
|
||||
{
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Text = BeatmapInfo.GetDisplayTitleRomanisable(false),
|
||||
Text = Beatmap.GetDisplayTitleRomanisable(false),
|
||||
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
|
||||
},
|
||||
new FillFlowContainer
|
||||
@ -93,7 +93,7 @@ namespace osu.Game.Tournament.Components
|
||||
},
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Text = BeatmapInfo.Metadata?.Author,
|
||||
Text = Beatmap.Metadata?.Author,
|
||||
Padding = new MarginPadding { Right = 20 },
|
||||
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
|
||||
},
|
||||
@ -105,7 +105,7 @@ namespace osu.Game.Tournament.Components
|
||||
},
|
||||
new TournamentSpriteText
|
||||
{
|
||||
Text = BeatmapInfo.DifficultyName,
|
||||
Text = Beatmap.DifficultyName,
|
||||
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
|
||||
},
|
||||
}
|
||||
@ -149,7 +149,7 @@ namespace osu.Game.Tournament.Components
|
||||
|
||||
private void updateState()
|
||||
{
|
||||
var found = currentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == BeatmapInfo.OnlineID);
|
||||
var found = currentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == Beatmap.OnlineID);
|
||||
|
||||
bool doFlash = found != choice;
|
||||
choice = found;
|
||||
|
Reference in New Issue
Block a user