mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Store mods to array and update test scenes
This commit is contained in:
parent
12a56e36bd
commit
0fe3bac173
@ -18,6 +18,7 @@ using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.BeatmapSet.Scores;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Users;
|
||||
using osuTK.Graphics;
|
||||
@ -146,12 +147,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
var scores = new APIScoresCollection
|
||||
{
|
||||
Scores = new List<APIScore>
|
||||
Scores = new List<SoloScoreInfo>
|
||||
{
|
||||
new APIScore
|
||||
new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 6602580,
|
||||
@ -175,10 +176,10 @@ namespace osu.Game.Tests.Visual.Online
|
||||
TotalScore = 1234567890,
|
||||
Accuracy = 1,
|
||||
},
|
||||
new APIScore
|
||||
new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 4608074,
|
||||
@ -201,10 +202,10 @@ namespace osu.Game.Tests.Visual.Online
|
||||
TotalScore = 1234789,
|
||||
Accuracy = 0.9997,
|
||||
},
|
||||
new APIScore
|
||||
new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 1014222,
|
||||
@ -226,10 +227,10 @@ namespace osu.Game.Tests.Visual.Online
|
||||
TotalScore = 12345678,
|
||||
Accuracy = 0.9854,
|
||||
},
|
||||
new APIScore
|
||||
new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 1541390,
|
||||
@ -250,10 +251,10 @@ namespace osu.Game.Tests.Visual.Online
|
||||
TotalScore = 1234567,
|
||||
Accuracy = 0.8765,
|
||||
},
|
||||
new APIScore
|
||||
new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 7151382,
|
||||
@ -275,12 +276,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
foreach (var s in scores.Scores)
|
||||
{
|
||||
s.Statistics = new Dictionary<string, int>
|
||||
s.Statistics = new Dictionary<HitResult, int>
|
||||
{
|
||||
{ "count_300", RNG.Next(2000) },
|
||||
{ "count_100", RNG.Next(2000) },
|
||||
{ "count_50", RNG.Next(2000) },
|
||||
{ "count_miss", RNG.Next(2000) }
|
||||
{ HitResult.Great, RNG.Next(2000) },
|
||||
{ HitResult.Good, RNG.Next(2000) },
|
||||
{ HitResult.Meh, RNG.Next(2000) },
|
||||
{ HitResult.Miss, RNG.Next(2000) }
|
||||
};
|
||||
}
|
||||
|
||||
@ -289,10 +290,10 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
private APIScoreWithPosition createUserBest() => new APIScoreWithPosition
|
||||
{
|
||||
Score = new APIScore
|
||||
Score = new SoloScoreInfo
|
||||
{
|
||||
Date = DateTimeOffset.Now,
|
||||
OnlineID = onlineID++,
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
ID = onlineID++,
|
||||
User = new APIUser
|
||||
{
|
||||
Id = 7151382,
|
||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public DateTimeOffset? EndedAt { get; set; }
|
||||
|
||||
[JsonProperty("mods")]
|
||||
public List<APIMod> Mods { get; set; } = new List<APIMod>();
|
||||
public APIMod[] Mods { get; set; } = Array.Empty<APIMod>();
|
||||
|
||||
[JsonIgnore]
|
||||
[JsonProperty("created_at")]
|
||||
|
Loading…
Reference in New Issue
Block a user