1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Add obsoletion notice

This commit is contained in:
smoogipoo 2020-10-01 12:28:33 +09:00
parent 3c9ee6abc1
commit c9f38f7bb6

View File

@ -10,6 +10,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Logging;
using osu.Framework.Threading;
using osu.Game.Audio;
using osu.Game.Rulesets.Judgements;
@ -476,12 +477,21 @@ namespace osu.Game.Rulesets.Objects.Drawables
throw new InvalidOperationException($"{GetType().ReadableName()} applied a {nameof(JudgementResult)} but did not update {nameof(JudgementResult.Type)}.");
// Some (especially older) rulesets use scorable judgements instead of the newer ignorehit/ignoremiss judgements.
// Can be removed 20210328
if (Result.Judgement.MaxResult == HitResult.IgnoreHit)
{
HitResult originalType = Result.Type;
if (Result.Type == HitResult.Miss)
Result.Type = HitResult.IgnoreMiss;
else if (Result.Type >= HitResult.Meh && Result.Type <= HitResult.Perfect)
Result.Type = HitResult.IgnoreHit;
if (Result.Type != originalType)
{
Logger.Log($"{GetType().ReadableName()} applied an invalid hit result ({originalType}) when {nameof(HitResult.IgnoreMiss)} or {nameof(HitResult.IgnoreHit)} is expected.\n"
+ $"This has been automatically adjusted to {Result.Type}, and support will be removed from 2020-03-28 onwards.", level: LogLevel.Important);
}
}
if (!Result.Type.IsValidHitResult(Result.Judgement.MinResult, Result.Judgement.MaxResult))