Add legacy skin fallback when beatmap skin is providing resources

This commit is contained in:
Dean Herbert
2022-10-12 17:47:20 +09:00
parent fd20515a6d
commit 8bf4ca4b53
6 changed files with 35 additions and 4 deletions

View File

@ -13,6 +13,10 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
{
public class CatchLegacySkinTransformer : LegacySkinTransformer
{
public override bool IsProvidingLegacyResources => base.IsProvidingLegacyResources || hasPear;
private bool hasPear => GetTexture("fruit-pear") != null;
/// <summary>
/// For simplicity, let's use legacy combo font texture existence as a way to identify legacy skins from default.
/// </summary>
@ -49,7 +53,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Legacy
switch (catchSkinComponent.Component)
{
case CatchSkinComponents.Fruit:
if (GetTexture("fruit-pear") != null)
if (hasPear)
return new LegacyFruitPiece();
return null;