mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Move validation to DHO.ApplyResult()
This commit is contained in:
parent
18d20cad8b
commit
a1a46e58fc
@ -672,6 +672,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
if (!Result.HasResult)
|
||||
throw new InvalidOperationException($"{GetType().ReadableName()} applied a {nameof(JudgementResult)} but did not update {nameof(JudgementResult.Type)}.");
|
||||
|
||||
HitResultExtensions.ValidateHitResultPair(Result.Judgement.MaxResult, Result.Judgement.MinResult);
|
||||
|
||||
if (!Result.Type.IsValidHitResult(Result.Judgement.MinResult, Result.Judgement.MaxResult))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
|
@ -151,8 +151,6 @@ 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