2019-03-04 12:24:19 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-10-16 15:07:59 +08:00
|
|
|
|
using System;
|
2018-09-10 03:51:38 +08:00
|
|
|
|
using System.Collections.Generic;
|
2018-10-16 15:07:59 +08:00
|
|
|
|
using Newtonsoft.Json;
|
2018-09-10 03:51:38 +08:00
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
|
2018-08-26 00:24:19 +08:00
|
|
|
|
namespace osu.Game.Tournament.Components
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2018-10-16 15:07:59 +08:00
|
|
|
|
[Serializable]
|
2018-08-25 20:40:40 +08:00
|
|
|
|
public class TournamentTeam
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this team.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FullName;
|
|
|
|
|
|
2018-09-10 03:51:38 +08:00
|
|
|
|
private string flagName;
|
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
/// <summary>
|
2018-08-25 20:40:40 +08:00
|
|
|
|
/// Name of the file containing the flag.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
/// </summary>
|
2018-09-10 03:51:38 +08:00
|
|
|
|
public string FlagName
|
|
|
|
|
{
|
2019-03-02 12:52:56 +08:00
|
|
|
|
get => flagName ?? Acronym?.Substring(0, 2);
|
|
|
|
|
set => flagName = value;
|
2018-09-10 03:51:38 +08:00
|
|
|
|
}
|
2018-08-25 20:40:40 +08:00
|
|
|
|
|
|
|
|
|
private string acronym;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-08-25 20:40:40 +08:00
|
|
|
|
/// Short acronym which appears in the group boxes post-selection.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
/// </summary>
|
2018-08-25 20:40:40 +08:00
|
|
|
|
public string Acronym
|
|
|
|
|
{
|
2019-03-02 12:52:56 +08:00
|
|
|
|
get => acronym ?? FullName?.Substring(0, 3);
|
|
|
|
|
set => acronym = value;
|
2018-08-25 20:40:40 +08:00
|
|
|
|
}
|
2018-09-10 03:51:38 +08:00
|
|
|
|
|
2018-10-16 15:07:59 +08:00
|
|
|
|
[JsonProperty]
|
2018-11-07 01:50:44 +08:00
|
|
|
|
public List<User> Players { get; set; } = new List<User>();
|
2018-09-22 04:52:25 +08:00
|
|
|
|
|
|
|
|
|
public override string ToString() => FullName ?? Acronym;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|