mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Fix legacy skin transformers potentially ignoring source implementations
This commit is contained in:
parent
53cbf369d7
commit
fbc316ea1d
@ -28,12 +28,15 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
||||
{
|
||||
case HUDSkinComponents.ComboCounter:
|
||||
// catch may provide its own combo counter; hide the default.
|
||||
return providesComboCounter ? Drawable.Empty() : null;
|
||||
if (providesComboCounter)
|
||||
return Drawable.Empty();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(component is CatchSkinComponent catchSkinComponent))
|
||||
return null;
|
||||
return Source.GetDrawableComponent(component);
|
||||
|
||||
switch (catchSkinComponent.Component)
|
||||
{
|
||||
@ -41,19 +44,19 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
||||
if (GetTexture("fruit-pear") != null)
|
||||
return new LegacyFruitPiece();
|
||||
|
||||
break;
|
||||
return null;
|
||||
|
||||
case CatchSkinComponents.Banana:
|
||||
if (GetTexture("fruit-bananas") != null)
|
||||
return new LegacyBananaPiece();
|
||||
|
||||
break;
|
||||
return null;
|
||||
|
||||
case CatchSkinComponents.Droplet:
|
||||
if (GetTexture("fruit-drop") != null)
|
||||
return new LegacyDropletPiece();
|
||||
|
||||
break;
|
||||
return null;
|
||||
|
||||
case CatchSkinComponents.CatcherIdle:
|
||||
return this.GetAnimation("fruit-catcher-idle", true, true, true) ??
|
||||
@ -71,10 +74,11 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
||||
if (providesComboCounter)
|
||||
return new LegacyCatchComboCounter(Source);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
default:
|
||||
return Source.GetDrawableComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
||||
|
@ -120,12 +120,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
||||
|
||||
case ManiaSkinComponents.StageForeground:
|
||||
return new LegacyStageForeground();
|
||||
|
||||
default:
|
||||
return Source.GetDrawableComponent(component);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
return Source.GetDrawableComponent(component);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Drawable getResult(HitResult result)
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
public override Drawable GetDrawableComponent(ISkinComponent component)
|
||||
{
|
||||
if (!(component is OsuSkinComponent osuComponent))
|
||||
return null;
|
||||
return Source.GetDrawableComponent(component);
|
||||
|
||||
switch (osuComponent.Component)
|
||||
{
|
||||
@ -115,9 +115,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
return new LegacyOldStyleSpinner();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
default:
|
||||
return Source.GetDrawableComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
}
|
||||
|
||||
if (!(component is TaikoSkinComponent taikoComponent))
|
||||
return null;
|
||||
return Source.GetDrawableComponent(component);
|
||||
|
||||
switch (taikoComponent.Component)
|
||||
{
|
||||
@ -130,10 +130,11 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
|
||||
case TaikoSkinComponents.Mascot:
|
||||
return new DrawableTaikoMascot();
|
||||
}
|
||||
|
||||
default:
|
||||
return Source.GetDrawableComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
private string getHitName(TaikoSkinComponents component)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user