Skip to content

Commit

Permalink
Merge pull request #29427 from frenzibyte/fix-ruleset-components-beat…
Browse files Browse the repository at this point in the history
…map-skin

Fix beatmap skin always overriding ruleset HUD components
  • Loading branch information
peppy committed Aug 15, 2024
2 parents 4b279ec + 49c71f7 commit e7b4a2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public CatchLegacySkinTransformer(ISkin skin)
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer d)
return d;

// we don't have enough assets to display these components (this is especially the case on a "beatmap" skin).
if (!IsProvidingLegacyResources)
return null;

// Our own ruleset components default.
// todo: remove CatchSkinComponents.CatchComboCounter and refactor LegacyCatchComboCounter to be added here instead.
return new DefaultSkinComponentsContainer(container =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public OsuLegacySkinTransformer(ISkin skin)
if (base.GetDrawableComponent(lookup) is UserConfiguredLayoutContainer d)
return d;

// we don't have enough assets to display these components (this is especially the case on a "beatmap" skin).
if (!IsProvidingLegacyResources)
return null;

// Our own ruleset components default.
switch (containerLookup.Target)
{
Expand Down

0 comments on commit e7b4a2f

Please sign in to comment.