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

Rename APIScoreInfo -> APILegacyScoreInfo

This commit is contained in:
smoogipoo 2019-03-27 17:08:40 +09:00
parent d2af2cf21d
commit 012dcc25c9
8 changed files with 27 additions and 29 deletions

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapSet.Scores;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu;
@ -44,9 +43,9 @@ namespace osu.Game.Tests.Visual.SongSelect
}
};
IEnumerable<APIScoreInfo> scores = new[]
IEnumerable<ScoreInfo> scores = new[]
{
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -69,7 +68,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 1234567890,
Accuracy = 1,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -91,7 +90,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 1234789,
Accuracy = 0.9997,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -112,7 +111,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 12345678,
Accuracy = 0.9854,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -132,7 +131,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 1234567,
Accuracy = 0.8765,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -157,9 +156,9 @@ namespace osu.Game.Tests.Visual.SongSelect
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
}
IEnumerable<APIScoreInfo> anotherScores = new[]
IEnumerable<ScoreInfo> anotherScores = new[]
{
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -181,7 +180,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 1234789,
Accuracy = 0.9997,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -204,7 +203,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 1234567890,
Accuracy = 1,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -220,7 +219,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 123456,
Accuracy = 0.6543,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -241,7 +240,7 @@ namespace osu.Game.Tests.Visual.SongSelect
TotalScore = 12345678,
Accuracy = 0.9854,
},
new APIScoreInfo
new ScoreInfo
{
User = new User
{
@ -269,7 +268,7 @@ namespace osu.Game.Tests.Visual.SongSelect
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
}
var topScoreInfo = new APIScoreInfo
var topScoreInfo = new ScoreInfo
{
User = new User
{

View File

@ -10,7 +10,7 @@ using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetScoresRequest : APIRequest<APIScores>
public class GetScoresRequest : APIRequest<APILegacyScores>
{
private readonly BeatmapInfo beatmap;
private readonly BeatmapLeaderboardScope scope;
@ -31,9 +31,9 @@ namespace osu.Game.Online.API.Requests
Success += onSuccess;
}
private void onSuccess(APIScores r)
private void onSuccess(APILegacyScores r)
{
foreach (APIScoreInfo score in r.Scores)
foreach (APILegacyScoreInfo score in r.Scores)
score.Beatmap = beatmap;
}

View File

@ -6,7 +6,7 @@ using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.API.Requests
{
public class GetUserScoresRequest : APIRequest<List<APIScoreInfo>>
public class GetUserScoresRequest : APIRequest<List<APILegacyScoreInfo>>
{
private readonly long userId;
private readonly ScoreType type;

View File

@ -13,7 +13,7 @@ using osu.Game.Users;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIScoreInfo : LegacyScoreInfo
public class APILegacyScoreInfo : LegacyScoreInfo
{
[JsonProperty(@"score")]
private int totalScore

View File

@ -6,9 +6,9 @@ using Newtonsoft.Json;
namespace osu.Game.Online.API.Requests.Responses
{
public class APIScores
public class APILegacyScores
{
[JsonProperty(@"scores")]
public IEnumerable<APIScoreInfo> Scores;
public IEnumerable<APILegacyScoreInfo> Scores;
}
}

View File

@ -9,12 +9,12 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Scoring;
using osu.Game.Users;
namespace osu.Game.Overlays.BeatmapSet.Scores
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly Box background;
public DrawableScore(int index, APIScoreInfo score)
public DrawableScore(int index, ScoreInfo score)
{
ScoreModsContainer modsContainer;

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Mods;
@ -43,9 +42,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly InfoColumn statistics;
private readonly ScoreModsContainer modsContainer;
private APIScoreInfo score;
private ScoreInfo score;
public APIScoreInfo Score
public ScoreInfo Score
{
get => score;
set

View File

@ -11,7 +11,7 @@ using System.Linq;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Scoring;
namespace osu.Game.Overlays.BeatmapSet.Scores
{
@ -29,10 +29,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
set => loadingAnimation.FadeTo(value ? 1 : 0, fade_duration);
}
private IEnumerable<APIScoreInfo> scores;
private IEnumerable<ScoreInfo> scores;
private BeatmapInfo beatmap;
public IEnumerable<APIScoreInfo> Scores
public IEnumerable<ScoreInfo> Scores
{
get => scores;
set