mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:47:27 +08:00
Actually validate judgements
This commit is contained in:
parent
9415fe4446
commit
65ac617be4
@ -91,10 +91,6 @@ namespace osu.Game.Rulesets.Judgements
|
||||
}
|
||||
}
|
||||
|
||||
public Judgement()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The numeric score representation for the maximum achievable result.
|
||||
/// </summary>
|
||||
|
@ -151,6 +151,8 @@ namespace osu.Game.Rulesets.Scoring
|
||||
{
|
||||
var judgement = obj.CreateJudgement();
|
||||
|
||||
HitResultExtensions.ValidateHitResultPair(judgement.MaxResult, judgement.MinResult);
|
||||
|
||||
var result = CreateResult(obj, judgement);
|
||||
if (result == null)
|
||||
throw new InvalidOperationException($"{GetType().ReadableName()} must provide a {nameof(JudgementResult)} through {nameof(CreateResult)}.");
|
||||
|
Loading…
Reference in New Issue
Block a user