1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 14:45:09 +08:00

Merge pull request #29458 from peppy/fix-incorrect-skin-shortcutting

Fix custom skin sprites no longer working
This commit is contained in:
Dan Balasescu 2024-08-17 03:13:46 +09:00 committed by GitHub
commit e4c1545bf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -94,13 +94,13 @@ namespace osu.Game.Skinning
// Temporary until default skin has a valid hit lighting. // Temporary until default skin has a valid hit lighting.
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty(); if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (lookup) switch (lookup)
{ {
case SkinComponentsContainerLookup containerLookup: case SkinComponentsContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (containerLookup.Target) switch (containerLookup.Target)
{ {
case SkinComponentsContainerLookup.TargetArea.SongSelect: case SkinComponentsContainerLookup.TargetArea.SongSelect:
@ -257,7 +257,7 @@ namespace osu.Game.Skinning
return null; return null;
} }
return null; return base.GetDrawableComponent(lookup);
} }
public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup) public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)

View File

@ -356,12 +356,12 @@ namespace osu.Game.Skinning
public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup) public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
{ {
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (lookup) switch (lookup)
{ {
case SkinComponentsContainerLookup containerLookup: case SkinComponentsContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (containerLookup.Target) switch (containerLookup.Target)
{ {
case SkinComponentsContainerLookup.TargetArea.MainHUDComponents: case SkinComponentsContainerLookup.TargetArea.MainHUDComponents:
@ -445,7 +445,7 @@ namespace osu.Game.Skinning
return null; return null;
} }
return null; return base.GetDrawableComponent(lookup);
} }
private Texture? getParticleTexture(HitResult result) private Texture? getParticleTexture(HitResult result)

View File

@ -64,12 +64,12 @@ namespace osu.Game.Skinning
// Temporary until default skin has a valid hit lighting. // Temporary until default skin has a valid hit lighting.
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty(); if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
switch (lookup) switch (lookup)
{ {
case SkinComponentsContainerLookup containerLookup: case SkinComponentsContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;
// Only handle global level defaults for now. // Only handle global level defaults for now.
if (containerLookup.Ruleset != null) if (containerLookup.Ruleset != null)
return null; return null;
@ -178,7 +178,7 @@ namespace osu.Game.Skinning
return null; return null;
} }
return null; return base.GetDrawableComponent(lookup);
} }
public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup) public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)