1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 04:32:57 +08:00

Update naming

This commit is contained in:
Dean Herbert 2022-07-18 16:16:59 +09:00
parent eddf106f7c
commit 51f91fe62e
5 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@ namespace osu.Game.Database
/// 14 2022-03-01 Added BeatmapUserSettings to BeatmapInfo.
/// 15 2022-07-13 Added LastPlayed to BeatmapInfo.
/// 16 2022-07-15 Removed HasReplay from ScoreInfo.
/// 17 2022-07-16 Added Country to RealmUser.
/// 17 2022-07-16 Added CountryCode to RealmUser.
/// </summary>
private const int schema_version = 17;

View File

@ -16,14 +16,14 @@ namespace osu.Game.Models
public string Username { get; set; } = string.Empty;
[Ignored]
public Country Country
public CountryCode CountryCode
{
get => Enum.TryParse(CountryString, out Country country) ? country : default;
get => Enum.TryParse(CountryString, out CountryCode country) ? country : default;
set => CountryString = value.ToString();
}
[MapTo(nameof(Country))]
public string CountryString { get; set; } = default(Country).ToString();
[MapTo(nameof(CountryCode))]
public string CountryString { get; set; } = default(CountryCode).ToString();
public bool IsBot => false;

View File

@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Mods
public class ModCreatedUser : IUser
{
public int OnlineID => APIUser.SYSTEM_USER_ID;
public Country Country => default;
public CountryCode CountryCode => default;
public bool IsBot => true;
public string Username { get; set; } = string.Empty;

View File

@ -87,7 +87,7 @@ namespace osu.Game.Scoring
{
Id = RealmUser.OnlineID,
Username = RealmUser.Username,
Country = RealmUser.Country,
CountryCode = RealmUser.CountryCode,
};
set
{
@ -97,7 +97,7 @@ namespace osu.Game.Scoring
{
OnlineID = user.OnlineID,
Username = user.Username,
Country = user.Country,
CountryCode = user.CountryCode,
};
}
}
@ -137,7 +137,7 @@ namespace osu.Game.Scoring
{
OnlineID = RealmUser.OnlineID,
Username = RealmUser.Username,
Country = RealmUser.Country,
CountryCode = RealmUser.CountryCode,
};
return clone;

View File

@ -10,7 +10,7 @@ namespace osu.Game.Users
{
string Username { get; }
Country Country { get; }
CountryCode CountryCode { get; }
bool IsBot { get; }