From 431c8a05b92edb8264ccb31d3970105edc48ac82 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 29 Apr 2023 16:50:56 +0800 Subject: [PATCH] Legacy skin should inherit the default skin transformer for able to inherit the base logic. --- .../Skinning/Legacy/KaraokeClassicSkinTransformer.cs | 4 ++-- .../Skinning/Legacy/KaraokeLegacySkinTransformer.cs | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeClassicSkinTransformer.cs b/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeClassicSkinTransformer.cs index ba876fe50..3b271be56 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeClassicSkinTransformer.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeClassicSkinTransformer.cs @@ -8,8 +8,8 @@ namespace osu.Game.Rulesets.Karaoke.Skinning.Legacy { public class KaraokeClassicSkinTransformer : KaraokeLegacySkinTransformer { - public KaraokeClassicSkinTransformer(ISkin source, IBeatmap beatmap) - : base(source, beatmap) + public KaraokeClassicSkinTransformer(ISkin skin, IBeatmap beatmap) + : base(skin, beatmap) { } } diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeLegacySkinTransformer.cs b/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeLegacySkinTransformer.cs index 2b3108f55..2d847e745 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeLegacySkinTransformer.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Legacy/KaraokeLegacySkinTransformer.cs @@ -6,18 +6,24 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Beatmaps; +using osu.Game.Rulesets.Karaoke.Skinning.Default; using osu.Game.Rulesets.Scoring; using osu.Game.Skinning; namespace osu.Game.Rulesets.Karaoke.Skinning.Legacy { - public class KaraokeLegacySkinTransformer : LegacySkinTransformer + /// + /// Not inherit the because: + /// 1. Karaoke ruleset does not have the legacy skin. + /// 2. There's not much logic in the + /// + public class KaraokeLegacySkinTransformer : KaraokeDefaultSkinTransformer { private readonly Lazy isLegacySkin; private readonly KaraokeBeatmapSkin karaokeSkin; - public KaraokeLegacySkinTransformer(ISkin source, IBeatmap beatmap) - : base(source) + public KaraokeLegacySkinTransformer(ISkin skin, IBeatmap beatmap) + : base(skin, beatmap) { // we should get config by default karaoke skin. // if has resource or texture, then try to get from legacy skin.