mirror of
https://github.com/ppy/osu
synced 2024-12-25 00:02:48 +00:00
Change statistics to be int for now
This commit is contained in:
parent
466505322e
commit
94045413ce
@ -100,7 +100,7 @@ namespace osu.Game.Tests.Scores.IO
|
||||
|
||||
var toImport = new ScoreInfo
|
||||
{
|
||||
Statistics = new Dictionary<HitResult, object>
|
||||
Statistics = new Dictionary<HitResult, int>
|
||||
{
|
||||
{ HitResult.Perfect, 100 },
|
||||
{ HitResult.Miss, 50 }
|
||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual
|
||||
MaxCombo = 123,
|
||||
Rank = ScoreRank.A,
|
||||
Date = DateTimeOffset.Now,
|
||||
Statistics = new Dictionary<HitResult, dynamic>
|
||||
Statistics = new Dictionary<HitResult, int>
|
||||
{
|
||||
{ HitResult.Great, 50 },
|
||||
{ HitResult.Good, 20 },
|
||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
}
|
||||
|
||||
[JsonProperty(@"statistics")]
|
||||
private Dictionary<string, object> jsonStats
|
||||
private Dictionary<string, int> jsonStats
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -116,12 +116,12 @@ namespace osu.Game.Scoring.Legacy
|
||||
|
||||
private void calculateAccuracy(ScoreInfo score)
|
||||
{
|
||||
int countMiss = (int)score.Statistics[HitResult.Miss];
|
||||
int count50 = (int)score.Statistics[HitResult.Meh];
|
||||
int count100 = (int)score.Statistics[HitResult.Good];
|
||||
int count300 = (int)score.Statistics[HitResult.Great];
|
||||
int countGeki = (int)score.Statistics[HitResult.Perfect];
|
||||
int countKatu = (int)score.Statistics[HitResult.Ok];
|
||||
int countMiss = score.Statistics[HitResult.Miss];
|
||||
int count50 = score.Statistics[HitResult.Meh];
|
||||
int count100 = score.Statistics[HitResult.Good];
|
||||
int count300 = score.Statistics[HitResult.Great];
|
||||
int countGeki = score.Statistics[HitResult.Perfect];
|
||||
int countKatu = score.Statistics[HitResult.Ok];
|
||||
|
||||
switch (score.Ruleset.ID)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ namespace osu.Game.Scoring
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Dictionary<HitResult, object> Statistics = new Dictionary<HitResult, object>();
|
||||
public Dictionary<HitResult, int> Statistics = new Dictionary<HitResult, int>();
|
||||
|
||||
[Column("Statistics")]
|
||||
public string StatisticsJson
|
||||
@ -118,7 +118,7 @@ namespace osu.Game.Scoring
|
||||
return;
|
||||
}
|
||||
|
||||
Statistics = JsonConvert.DeserializeObject<Dictionary<HitResult, object>>(value);
|
||||
Statistics = JsonConvert.DeserializeObject<Dictionary<HitResult, int>>(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,9 +196,9 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
private class DrawableScoreStatistic : Container
|
||||
{
|
||||
private readonly KeyValuePair<HitResult, object> statistic;
|
||||
private readonly KeyValuePair<HitResult, int> statistic;
|
||||
|
||||
public DrawableScoreStatistic(KeyValuePair<HitResult, object> statistic)
|
||||
public DrawableScoreStatistic(KeyValuePair<HitResult, int> statistic)
|
||||
{
|
||||
this.statistic = statistic;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user