1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 14:12:55 +08:00

Fix formatting issues

This commit is contained in:
Dean Herbert 2019-03-02 13:52:56 +09:00
parent f183210362
commit 4c66ebb501
5 changed files with 12 additions and 10 deletions

View File

@ -23,8 +23,8 @@ namespace osu.Game.Tournament.Components
/// </summary>
public string FlagName
{
get { return flagName ?? Acronym?.Substring(0, 2); }
set { flagName = value; }
get => flagName ?? Acronym?.Substring(0, 2);
set => flagName = value;
}
private string acronym;
@ -34,8 +34,8 @@ namespace osu.Game.Tournament.Components
/// </summary>
public string Acronym
{
get { return acronym ?? FullName?.Substring(0, 3); }
set { acronym = value; }
get => acronym ?? FullName?.Substring(0, 3);
set => acronym = value;
}
[JsonProperty]

View File

@ -129,7 +129,6 @@ namespace osu.Game.Tournament.IPC
{
protected override string LocateBasePath()
{
bool checkExists(string p)
{
return File.Exists(Path.Combine(p, "ipc.txt"));

View File

@ -121,7 +121,8 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
{
private readonly FillFlowContainer innerContainer;
public GroupTeam(TournamentTeam team) : base(team)
public GroupTeam(TournamentTeam team)
: base(team)
{
Width = 36;
AutoSizeAxes = Axes.Y;

View File

@ -111,6 +111,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
set
{
if (value == selected) return;
selected = value;
if (selected)

View File

@ -57,8 +57,9 @@ namespace osu.Game.Tournament.Screens.Schedule
}
var upcoming = ladder.Pairings.Where(p => !p.Completed.Value && p.Team1.Value != null && p.Team2.Value != null && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4);
var conditionals = ladder.Pairings.Where(p => !p.Completed.Value && (p.Team1.Value == null || p.Team2.Value == null) && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4)
.SelectMany(m => m.ConditionalPairings.Where(cp => m.Acronyms.TrueForAll(a => cp.Acronyms.Contains(a))));
var conditionals = ladder
.Pairings.Where(p => !p.Completed.Value && (p.Team1.Value == null || p.Team2.Value == null) && Math.Abs(p.Date.Value.DayOfYear - DateTimeOffset.UtcNow.DayOfYear) < 4)
.SelectMany(m => m.ConditionalPairings.Where(cp => m.Acronyms.TrueForAll(a => cp.Acronyms.Contains(a))));
upcoming = upcoming.Concat(conditionals);
upcoming = upcoming.OrderBy(p => p.Date.Value).Take(12);
@ -145,7 +146,7 @@ namespace osu.Game.Tournament.Screens.Schedule
Anchor = Anchor.TopRight,
Origin = Anchor.TopLeft,
Colour = Color4.Black,
Alpha = conditional ? 0.6f : 1,
Alpha = conditional ? 0.6f : 1,
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
});
AddInternal(new OsuSpriteText
@ -153,7 +154,7 @@ namespace osu.Game.Tournament.Screens.Schedule
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomLeft,
Colour = Color4.Black,
Alpha = conditional ? 0.6f : 1,
Alpha = conditional ? 0.6f : 1,
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
Text = pairing.Date.Value.ToUniversalTime().ToString("HH:mm UTC") + (conditional ? " (conditional)" : "")
});