mirror of https://github.com/ppy/osu
Fix `SkinnableSprite` lookups broken in lazer-first skins
Regressed with removal of local `GetTexture` calls in e19ba65f91
This commit is contained in:
parent
f7913cbf1c
commit
eae8530722
|
@ -82,21 +82,14 @@ public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources)
|
|||
|
||||
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
|
||||
{
|
||||
// Temporary until default skin has a valid hit lighting.
|
||||
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();
|
||||
|
||||
if (base.GetDrawableComponent(lookup) is Drawable c)
|
||||
return c;
|
||||
|
||||
switch (lookup)
|
||||
{
|
||||
case SkinnableSprite.SpriteComponentLookup spriteLookup:
|
||||
switch (spriteLookup.LookupName)
|
||||
{
|
||||
// Temporary until default skin has a valid hit lighting.
|
||||
case @"lighting":
|
||||
return Drawable.Empty();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GlobalSkinComponentLookup globalLookup:
|
||||
switch (globalLookup.Lookup)
|
||||
{
|
||||
|
|
|
@ -396,9 +396,6 @@ protected override void ParseConfigurationStream(Stream stream)
|
|||
}
|
||||
|
||||
return null;
|
||||
|
||||
case SkinnableSprite.SpriteComponentLookup sprite:
|
||||
return this.GetAnimation(sprite.LookupName, false, false);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -158,6 +158,10 @@ public void UpdateDrawableTarget(ISkinnableTarget targetContainer)
|
|||
{
|
||||
switch (lookup)
|
||||
{
|
||||
// This fallback is important for user skins which use SkinnableSprites.
|
||||
case SkinnableSprite.SpriteComponentLookup sprite:
|
||||
return this.GetAnimation(sprite.LookupName, false, false);
|
||||
|
||||
case GlobalSkinComponentLookup target:
|
||||
if (!DrawableComponentInfo.TryGetValue(target.Lookup, out var skinnableInfo))
|
||||
return null;
|
||||
|
|
|
@ -60,21 +60,14 @@ public TrianglesSkin(SkinInfo skin, IStorageResourceProvider resources)
|
|||
|
||||
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
|
||||
{
|
||||
// Temporary until default skin has a valid hit lighting.
|
||||
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();
|
||||
|
||||
if (base.GetDrawableComponent(lookup) is Drawable c)
|
||||
return c;
|
||||
|
||||
switch (lookup)
|
||||
{
|
||||
case SkinnableSprite.SpriteComponentLookup spriteLookup:
|
||||
switch (spriteLookup.LookupName)
|
||||
{
|
||||
// Temporary until default skin has a valid hit lighting.
|
||||
case @"lighting":
|
||||
return Drawable.Empty();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GlobalSkinComponentLookup target:
|
||||
switch (target.Lookup)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue