1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-10 01:50:46 +09:00

Grouped play values in a ScoreStatistics item in SimulateCommand output

This commit is contained in:
Matthieu Locussol 2021-10-12 22:00:21 +02:00
parent d1d95671d4
commit 7016867bdb
No known key found for this signature in database
GPG key ID: E8244CD967D86617

View file

@ -94,18 +94,17 @@ namespace PerformanceCalculator.Simulate
{ "Beatmap", workingBeatmap.BeatmapInfo.ToString() }
};
o["ScoreStatistics"] = new JObject {};
foreach (var info in getPlayValues(scoreInfo, beatmap))
o["ScoreStatistics"][info.Key] = info.Value;
foreach (var kvp in categoryAttribs)
o[kvp.Key] = kvp.Value;
o["Mods"] = mods.Length > 0 ? mods.Select(m => m.Acronym).Aggregate((c, n) => $"{c}, {n}") : "None";
o["pp"] = new JObject
{
{ "Total", pp },
};
foreach (var info in getPlayValues(scoreInfo, beatmap))
o["pp"][info.Key] = info.Value;
o["pp"] = pp;
string json = o.ToString();