Revert "Remove dead code" (mostly)

This reverts commit 6070eac6ee.
This commit is contained in:
Dean Herbert 2024-01-29 19:41:03 +09:00
parent fd9527d523
commit 8341da7586
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View File

@ -53,7 +53,7 @@ namespace osu.Game.Skinning
if (!result.IsMiss())
{
//new judgement shows old as a temporary effect
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f)
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
{
Blending = BlendingParameters.Additive,
Anchor = Anchor.Centre,

View File

@ -18,14 +18,16 @@ namespace osu.Game.Skinning
private readonly HitResult result;
private readonly float finalScale;
private readonly bool forceTransforms;
[Resolved]
private ISkinSource skin { get; set; } = null!;
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f)
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
{
this.result = result;
this.finalScale = finalScale;
this.forceTransforms = forceTransforms;
AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre;
@ -45,6 +47,10 @@ namespace osu.Game.Skinning
this.FadeInFromZero(fade_in_length);
// legacy judgements don't play any transforms if they are an animation.... UNLESS they are the temporary displayed judgement from new piece.
if (animation?.FrameCount > 1 && !forceTransforms)
return;
if (result.IsMiss())
{
decimal? legacyVersion = skin.GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value;
@ -95,12 +101,6 @@ namespace osu.Game.Skinning
private bool isMissedTick() => result.IsMiss() && result != HitResult.Miss;
private void applyMissedTickScaling()
{
this.ScaleTo(0.6f);
this.ScaleTo(0.3f, 100, Easing.In);
}
public Drawable GetAboveHitObjectsProxiedContent() => CreateProxy();
}
}