1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Remove pairings that shouldn't be valid

This commit is contained in:
Dan Balasescu 2023-10-10 10:03:37 +09:00
parent 89a3be11cb
commit 04ce223e66
No known key found for this signature in database
2 changed files with 12 additions and 9 deletions

View File

@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Judgements
/// </listheader>
/// <item>
/// <term><see cref="HitResult.Perfect"/>, <see cref="HitResult.Great"/>, <see cref="HitResult.Good"/>, <see cref="HitResult.Ok"/>, <see cref="HitResult.Meh"/></term>
/// <description><see cref="HitResult.Miss"/>, <see cref="HitResult.IgnoreMiss"/>, <see cref="HitResult.ComboBreak"/></description>
/// <description><see cref="HitResult.Miss"/></description>
/// </item>
/// <item>
/// <term><see cref="HitResult.LargeBonus"/></term>
@ -56,11 +56,11 @@ namespace osu.Game.Rulesets.Judgements
/// </item>
/// <item>
/// <term><see cref="HitResult.SmallTickHit"/></term>
/// <description><see cref="HitResult.SmallTickMiss"/>, <see cref="HitResult.IgnoreMiss"/>, <see cref="HitResult.ComboBreak"/></description>
/// <description><see cref="HitResult.SmallTickMiss"/></description>
/// </item>
/// <item>
/// <term><see cref="HitResult.LargeTickHit"/></term>
/// <description><see cref="HitResult.LargeTickMiss"/>, <see cref="HitResult.IgnoreMiss"/>, <see cref="HitResult.ComboBreak"/></description>
/// <description><see cref="HitResult.LargeTickMiss"/></description>
/// </item>
/// <item>
/// <term><see cref="HitResult.IgnoreHit"/></term>

View File

@ -337,17 +337,20 @@ namespace osu.Game.Rulesets.Scoring
if (minResult == HitResult.None || IsHit(minResult))
throw new ArgumentOutOfRangeException(nameof(minResult), $"{minResult} is not a valid minimum judgement result.");
if (maxResult == HitResult.IgnoreHit && minResult is not (HitResult.IgnoreMiss or HitResult.ComboBreak))
throw new ArgumentOutOfRangeException(nameof(minResult), $"{minResult} is not a valid minimum result for a {maxResult} judgement.");
if (maxResult.IsBonus() && minResult != HitResult.IgnoreMiss)
throw new ArgumentOutOfRangeException(nameof(minResult), $"{HitResult.IgnoreMiss} is the only valid minimum result for a {maxResult} judgement.");
if (maxResult == HitResult.LargeTickHit && minResult is not (HitResult.LargeTickMiss or HitResult.IgnoreMiss or HitResult.ComboBreak))
throw new ArgumentOutOfRangeException(nameof(minResult), $"{minResult} is not a valid minimum result for a {maxResult} judgement.");
if (maxResult == HitResult.LargeTickHit && minResult != HitResult.LargeTickMiss)
throw new ArgumentOutOfRangeException(nameof(minResult), $"{HitResult.LargeTickMiss} is the only valid minimum result for a {maxResult} judgement.");
if (maxResult == HitResult.SmallTickHit && minResult is not (HitResult.SmallTickMiss or HitResult.IgnoreMiss or HitResult.ComboBreak))
throw new ArgumentOutOfRangeException(nameof(minResult), $"{minResult} is not a valid minimum result for a {maxResult} judgement.");
if (maxResult == HitResult.SmallTickHit && minResult != HitResult.SmallTickMiss)
throw new ArgumentOutOfRangeException(nameof(minResult), $"{HitResult.SmallTickMiss} is the only valid minimum result for a {maxResult} judgement.");
if (maxResult.IsBasic() && minResult is not (HitResult.Miss or HitResult.IgnoreMiss or HitResult.ComboBreak))
throw new ArgumentOutOfRangeException(nameof(minResult), $"{minResult} is not a valid minimum result for a {maxResult} judgement.");
if (maxResult.IsBasic() && minResult != HitResult.Miss)
throw new ArgumentOutOfRangeException(nameof(minResult), $"{HitResult.Miss} is the only valid minimum result for a {maxResult} judgement.");
}
}
#pragma warning restore CS0618