mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into remove-countries-json
This commit is contained in:
@ -23,7 +23,7 @@ namespace osu.Game.Tournament.Models
|
||||
/// The player's country.
|
||||
/// </summary>
|
||||
[JsonProperty("country_code")]
|
||||
public Country Country { get; set; }
|
||||
public CountryCode CountryCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The player's global rank, or null if not available.
|
||||
@ -41,7 +41,7 @@ namespace osu.Game.Tournament.Models
|
||||
{
|
||||
Id = OnlineID,
|
||||
Username = Username,
|
||||
Country = Country,
|
||||
CountryCode = CountryCode,
|
||||
CoverUrl = CoverUrl,
|
||||
};
|
||||
|
||||
|
@ -21,6 +21,7 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Tournament.IO;
|
||||
using osu.Game.Tournament.IPC;
|
||||
using osu.Game.Tournament.Models;
|
||||
using osu.Game.Users;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Tournament
|
||||
@ -187,7 +188,7 @@ namespace osu.Game.Tournament
|
||||
var playersRequiringPopulation = ladder.Teams
|
||||
.SelectMany(t => t.Players)
|
||||
.Where(p => string.IsNullOrEmpty(p.Username)
|
||||
|| p.Country == default
|
||||
|| p.CountryCode == CountryCode.Unknown
|
||||
|| p.Rank == null).ToList();
|
||||
|
||||
if (playersRequiringPopulation.Count == 0)
|
||||
@ -290,7 +291,7 @@ namespace osu.Game.Tournament
|
||||
|
||||
user.Username = res.Username;
|
||||
user.CoverUrl = res.CoverUrl;
|
||||
user.Country = res.Country;
|
||||
user.CountryCode = res.CountryCode;
|
||||
user.Rank = res.Statistics?.GlobalRank;
|
||||
|
||||
success?.Invoke();
|
||||
|
Reference in New Issue
Block a user