Decode Geki/Katu from legacy taiko scores into LargeBonus

This commit is contained in:
Dan Balasescu
2022-09-07 00:11:51 +09:00
parent 6a371eba5f
commit 7c0e99c5a8
3 changed files with 42 additions and 4 deletions

View File

@ -3,6 +3,7 @@
#nullable disable
using System.Collections.Generic;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Scoring.Legacy
@ -13,6 +14,9 @@ namespace osu.Game.Scoring.Legacy
{
switch (scoreInfo.Ruleset.OnlineID)
{
case 1:
return getCount(scoreInfo, HitResult.LargeBonus);
case 3:
return getCount(scoreInfo, HitResult.Perfect);
}
@ -24,6 +28,12 @@ namespace osu.Game.Scoring.Legacy
{
switch (scoreInfo.Ruleset.OnlineID)
{
// For legacy scores, Geki indicates hit300 + perfect strong note hit.
// Lazer only has one result for a perfect strong note hit (LargeBonus).
case 1:
scoreInfo.Statistics[HitResult.LargeBonus] = scoreInfo.Statistics.GetValueOrDefault(HitResult.LargeBonus) + value;
break;
case 3:
scoreInfo.Statistics[HitResult.Perfect] = value;
break;
@ -38,11 +48,15 @@ namespace osu.Game.Scoring.Legacy
{
switch (scoreInfo.Ruleset.OnlineID)
{
case 3:
return getCount(scoreInfo, HitResult.Good);
// For taiko, Katu is bundled into Geki.
case 1:
break;
case 2:
return getCount(scoreInfo, HitResult.SmallTickMiss);
case 3:
return getCount(scoreInfo, HitResult.Good);
}
return null;
@ -52,13 +66,19 @@ namespace osu.Game.Scoring.Legacy
{
switch (scoreInfo.Ruleset.OnlineID)
{
case 3:
scoreInfo.Statistics[HitResult.Good] = value;
// For legacy scores, Katu indicates hit100 + perfect strong note hit.
// Lazer only has one result for a perfect strong note hit (LargeBonus).
case 1:
scoreInfo.Statistics[HitResult.LargeBonus] = scoreInfo.Statistics.GetValueOrDefault(HitResult.LargeBonus) + value;
break;
case 2:
scoreInfo.Statistics[HitResult.SmallTickMiss] = value;
break;
case 3:
scoreInfo.Statistics[HitResult.Good] = value;
break;
}
}