mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Add obsoletion notice
This commit is contained in:
parent
3c9ee6abc1
commit
c9f38f7bb6
@ -10,6 +10,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Extensions.TypeExtensions;
|
using osu.Framework.Extensions.TypeExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Rulesets.Judgements;
|
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)}.");
|
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.
|
// Some (especially older) rulesets use scorable judgements instead of the newer ignorehit/ignoremiss judgements.
|
||||||
|
// Can be removed 20210328
|
||||||
if (Result.Judgement.MaxResult == HitResult.IgnoreHit)
|
if (Result.Judgement.MaxResult == HitResult.IgnoreHit)
|
||||||
{
|
{
|
||||||
|
HitResult originalType = Result.Type;
|
||||||
|
|
||||||
if (Result.Type == HitResult.Miss)
|
if (Result.Type == HitResult.Miss)
|
||||||
Result.Type = HitResult.IgnoreMiss;
|
Result.Type = HitResult.IgnoreMiss;
|
||||||
else if (Result.Type >= HitResult.Meh && Result.Type <= HitResult.Perfect)
|
else if (Result.Type >= HitResult.Meh && Result.Type <= HitResult.Perfect)
|
||||||
Result.Type = HitResult.IgnoreHit;
|
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))
|
if (!Result.Type.IsValidHitResult(Result.Judgement.MinResult, Result.Judgement.MaxResult))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user