mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08: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:
|
case HUDSkinComponents.ComboCounter:
|
||||||
// catch may provide its own combo counter; hide the default.
|
// 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))
|
if (!(component is CatchSkinComponent catchSkinComponent))
|
||||||
return null;
|
return Source.GetDrawableComponent(component);
|
||||||
|
|
||||||
switch (catchSkinComponent.Component)
|
switch (catchSkinComponent.Component)
|
||||||
{
|
{
|
||||||
@ -41,19 +44,19 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
|||||||
if (GetTexture("fruit-pear") != null)
|
if (GetTexture("fruit-pear") != null)
|
||||||
return new LegacyFruitPiece();
|
return new LegacyFruitPiece();
|
||||||
|
|
||||||
break;
|
return null;
|
||||||
|
|
||||||
case CatchSkinComponents.Banana:
|
case CatchSkinComponents.Banana:
|
||||||
if (GetTexture("fruit-bananas") != null)
|
if (GetTexture("fruit-bananas") != null)
|
||||||
return new LegacyBananaPiece();
|
return new LegacyBananaPiece();
|
||||||
|
|
||||||
break;
|
return null;
|
||||||
|
|
||||||
case CatchSkinComponents.Droplet:
|
case CatchSkinComponents.Droplet:
|
||||||
if (GetTexture("fruit-drop") != null)
|
if (GetTexture("fruit-drop") != null)
|
||||||
return new LegacyDropletPiece();
|
return new LegacyDropletPiece();
|
||||||
|
|
||||||
break;
|
return null;
|
||||||
|
|
||||||
case CatchSkinComponents.CatcherIdle:
|
case CatchSkinComponents.CatcherIdle:
|
||||||
return this.GetAnimation("fruit-catcher-idle", true, true, true) ??
|
return this.GetAnimation("fruit-catcher-idle", true, true, true) ??
|
||||||
@ -71,10 +74,11 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
|
|||||||
if (providesComboCounter)
|
if (providesComboCounter)
|
||||||
return new LegacyCatchComboCounter(Source);
|
return new LegacyCatchComboCounter(Source);
|
||||||
|
|
||||||
break;
|
return null;
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
default:
|
||||||
|
return Source.GetDrawableComponent(component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
||||||
|
@ -120,12 +120,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
|||||||
|
|
||||||
case ManiaSkinComponents.StageForeground:
|
case ManiaSkinComponents.StageForeground:
|
||||||
return new LegacyStageForeground();
|
return new LegacyStageForeground();
|
||||||
|
|
||||||
|
default:
|
||||||
|
return Source.GetDrawableComponent(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
default:
|
||||||
|
return Source.GetDrawableComponent(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getResult(HitResult result)
|
private Drawable getResult(HitResult result)
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
public override Drawable GetDrawableComponent(ISkinComponent component)
|
public override Drawable GetDrawableComponent(ISkinComponent component)
|
||||||
{
|
{
|
||||||
if (!(component is OsuSkinComponent osuComponent))
|
if (!(component is OsuSkinComponent osuComponent))
|
||||||
return null;
|
return Source.GetDrawableComponent(component);
|
||||||
|
|
||||||
switch (osuComponent.Component)
|
switch (osuComponent.Component)
|
||||||
{
|
{
|
||||||
@ -115,9 +115,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
return new LegacyOldStyleSpinner();
|
return new LegacyOldStyleSpinner();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
default:
|
||||||
|
return Source.GetDrawableComponent(component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
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))
|
if (!(component is TaikoSkinComponent taikoComponent))
|
||||||
return null;
|
return Source.GetDrawableComponent(component);
|
||||||
|
|
||||||
switch (taikoComponent.Component)
|
switch (taikoComponent.Component)
|
||||||
{
|
{
|
||||||
@ -130,9 +130,10 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
|
|
||||||
case TaikoSkinComponents.Mascot:
|
case TaikoSkinComponents.Mascot:
|
||||||
return new DrawableTaikoMascot();
|
return new DrawableTaikoMascot();
|
||||||
}
|
|
||||||
|
|
||||||
return Source.GetDrawableComponent(component);
|
default:
|
||||||
|
return Source.GetDrawableComponent(component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getHitName(TaikoSkinComponents component)
|
private string getHitName(TaikoSkinComponents component)
|
||||||
|
Loading…
Reference in New Issue
Block a user