Skip to content

Commit

Permalink
Merge pull request #29458 from peppy/fix-incorrect-skin-shortcutting
Browse files Browse the repository at this point in the history
Fix custom skin sprites no longer working
  • Loading branch information
smoogipoo authored Aug 16, 2024
2 parents 3b94d1f + d1d195c commit e4c1545
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions osu.Game/Skinning/ArgonSkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources)
// Temporary until default skin has a valid hit lighting.
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();

if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

switch (lookup)
{
case SkinComponentsContainerLookup containerLookup:

if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

switch (containerLookup.Target)
{
case SkinComponentsContainerLookup.TargetArea.SongSelect:
Expand Down Expand Up @@ -257,7 +257,7 @@ public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources)
return null;
}

return null;
return base.GetDrawableComponent(lookup);
}

public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
Expand Down
8 changes: 4 additions & 4 deletions osu.Game/Skinning/LegacySkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ protected override void ParseConfigurationStream(Stream stream)

public override Drawable? GetDrawableComponent(ISkinComponentLookup lookup)
{
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

switch (lookup)
{
case SkinComponentsContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

switch (containerLookup.Target)
{
case SkinComponentsContainerLookup.TargetArea.MainHUDComponents:
Expand Down Expand Up @@ -445,7 +445,7 @@ protected override void ParseConfigurationStream(Stream stream)
return null;
}

return null;
return base.GetDrawableComponent(lookup);
}

private Texture? getParticleTexture(HitResult result)
Expand Down
8 changes: 4 additions & 4 deletions osu.Game/Skinning/TrianglesSkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public TrianglesSkin(SkinInfo skin, IStorageResourceProvider resources)
// Temporary until default skin has a valid hit lighting.
if ((lookup as SkinnableSprite.SpriteComponentLookup)?.LookupName == @"lighting") return Drawable.Empty();

if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

switch (lookup)
{
case SkinComponentsContainerLookup containerLookup:
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer c)
return c;

// Only handle global level defaults for now.
if (containerLookup.Ruleset != null)
return null;
Expand Down Expand Up @@ -178,7 +178,7 @@ public TrianglesSkin(SkinInfo skin, IStorageResourceProvider resources)
return null;
}

return null;
return base.GetDrawableComponent(lookup);
}

public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
Expand Down

0 comments on commit e4c1545

Please sign in to comment.