From 9874ce49ce6f81165862961ee6244b2267629c9a Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Thu, 7 Nov 2019 15:55:34 +0300 Subject: [PATCH] Move fallback allowance to the skin configuration only. --- osu.Game/Skinning/LegacyBeatmapSkin.cs | 5 ++--- osu.Game/Skinning/LegacySkin.cs | 7 ------- osu.Game/Skinning/SkinConfiguration.cs | 7 +++++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/osu.Game/Skinning/LegacyBeatmapSkin.cs b/osu.Game/Skinning/LegacyBeatmapSkin.cs index 4e020083a7..fa7e895a28 100644 --- a/osu.Game/Skinning/LegacyBeatmapSkin.cs +++ b/osu.Game/Skinning/LegacyBeatmapSkin.cs @@ -9,12 +9,11 @@ namespace osu.Game.Skinning { public class LegacyBeatmapSkin : LegacySkin { - // Disallow default colours fallback on beatmap skins to allow using parent skin combo colours. (via SkinProvidingContainer) - protected override bool AllowDefaultColoursFallback => false; - public LegacyBeatmapSkin(BeatmapInfo beatmap, IResourceStore storage, AudioManager audioManager) : base(createSkinInfo(beatmap), new LegacySkinResourceStore(beatmap.BeatmapSet, storage), audioManager, beatmap.Path) { + // Disallow default colours fallback on beatmap skins to allow using parent skin combo colours. (via SkinProvidingContainer) + Configuration.AllowDefaultComboColoursFallback = false; } private static SkinInfo createSkinInfo(BeatmapInfo beatmap) => diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index 94c2c8668f..359acc3a8f 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -26,11 +26,6 @@ namespace osu.Game.Skinning [CanBeNull] protected IResourceStore Samples; - /// - /// Whether to allow default combo colours as fallback if none provided in this skin. - /// - protected virtual bool AllowDefaultColoursFallback => true; - public LegacySkin(SkinInfo skin, IResourceStore storage, AudioManager audioManager) : this(skin, new LegacySkinResourceStore(skin, storage), audioManager, "skin.ini") { @@ -46,8 +41,6 @@ namespace osu.Game.Skinning else Configuration = new SkinConfiguration(); - Configuration.AllowDefaultColoursFallback = AllowDefaultColoursFallback; - if (storage != null) { Samples = audioManager?.GetSampleStore(storage); diff --git a/osu.Game/Skinning/SkinConfiguration.cs b/osu.Game/Skinning/SkinConfiguration.cs index 1fd781a5b3..da833acd98 100644 --- a/osu.Game/Skinning/SkinConfiguration.cs +++ b/osu.Game/Skinning/SkinConfiguration.cs @@ -16,7 +16,10 @@ namespace osu.Game.Skinning { public readonly SkinInfo SkinInfo = new SkinInfo(); - internal bool AllowDefaultColoursFallback; + /// + /// Whether to allow as a fallback list for when no combo colours are provided. + /// + internal bool AllowDefaultComboColoursFallback = true; public static List DefaultComboColours = new List { @@ -35,7 +38,7 @@ namespace osu.Game.Skinning if (comboColours.Count > 0) return comboColours; - if (AllowDefaultColoursFallback) + if (AllowDefaultComboColoursFallback) return DefaultComboColours; return null;