Expand explanation in inline comment

This commit is contained in:
Dean Herbert 2024-07-05 10:09:06 +09:00
parent e3c8bee7d0
commit f201cc3fea
No known key found for this signature in database
1 changed files with 10 additions and 2 deletions

View File

@ -101,8 +101,16 @@ private void load(SkinManager skins)
bool userSkinIsLegacy = skins.CurrentSkin.Value is LegacySkin;
bool beatmapProvidingResources = skin is LegacySkinTransformer legacySkin && legacySkin.IsProvidingLegacyResources;
// If the beatmap skin looks to have skinnable resources and the user's skin choice is not a legacy skin,
// add the default classic skin as a fallback opportunity.
// Some beatmaps provide a limited selection of skin elements to add some visual flair.
// In stable, these elements will take lookup priority over the selected skin (whether that be a user skin or default).
//
// To replicate this we need to pay special attention to the fallback order.
// If a user has a non-legacy skin (argon, triangles) selected, the game won't normally fall back to a legacy skin.
// In turn this can create an unexpected visual experience.
//
// So here, check what skin the user has selected. If it's already a legacy skin then we don't need to do anything special.
// If it isn't, we insert the classic default. Note that this is only done if the beatmap seems to be providing skin elements,
// as we only want to override the user's (non-legacy) skin choice when required for beatmap skin visuals.
if (!userSkinIsLegacy && beatmapProvidingResources && classicFallback != null)
SetSources(new[] { skin, classicFallback });
else