diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index da7c95a46f..6faadfba9b 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -376,8 +376,7 @@ namespace osu.Game.Skinning } }) { - new LegacyDefaultComboCounter(), - new LegacyHealthDisplay(), + new LegacyDefaultComboCounter() }; } @@ -416,6 +415,7 @@ namespace osu.Game.Skinning new LegacyScoreCounter(), new LegacyAccuracyCounter(), new LegacySongProgress(), + new LegacyHealthDisplay(), new BarHitErrorMeter(), } }; diff --git a/osu.Game/Skinning/Skin.cs b/osu.Game/Skinning/Skin.cs index e22b00f2b0..1afbf1d5e9 100644 --- a/osu.Game/Skinning/Skin.cs +++ b/osu.Game/Skinning/Skin.cs @@ -23,7 +23,6 @@ using osu.Game.Database; using osu.Game.IO; using osu.Game.Rulesets; using osu.Game.Screens.Play.HUD; -using osuTK; namespace osu.Game.Skinning { @@ -318,57 +317,6 @@ namespace osu.Game.Skinning break; } - - case 2: - { - // Legacy health bar is moved from the global HUD components target into per-ruleset. - // On osu!mania, the health bar is moved from the HUD to Playfield target for stage-based positioning. - if (resources == null) - break; - - var hudLayout = layoutInfos.GetValueOrDefault(GlobalSkinnableContainers.MainHUDComponents); - var playfieldLayout = layoutInfos.GetValueOrDefault(GlobalSkinnableContainers.Playfield); - - if (hudLayout == null || !hudLayout.TryGetDrawableInfo(null, out var globalHUDComponents)) - globalHUDComponents = Array.Empty(); - - var legacyHealthBars = globalHUDComponents.Where(h => h.Type.Name == nameof(LegacyHealthDisplay)).ToArray(); - hudLayout?.Update(null, globalHUDComponents.Except(legacyHealthBars).ToArray()); - - resources.RealmAccess.Run(r => - { - foreach (var ruleset in r.All()) - { - if (ruleset.ShortName == @"mania") - { - // should avoid adding legacy health bar to non-legacy skins (unless explicitly added by user). - if (!legacyHealthBars.Any()) - break; - - var legacyManiaHealthDisplay = new LegacyHealthDisplay - { - Rotation = -90f, - Anchor = Anchor.BottomRight, - Origin = Anchor.TopLeft, - X = 1, - Scale = new Vector2(0.7f), - }.CreateSerialisedInfo(); - - playfieldLayout?.Update(ruleset, playfieldLayout.TryGetDrawableInfo(ruleset, out var maniaPlayfieldComponents) - ? maniaPlayfieldComponents.Append(legacyManiaHealthDisplay).ToArray() - : new[] { legacyManiaHealthDisplay }); - } - else - { - hudLayout?.Update(ruleset, hudLayout.TryGetDrawableInfo(ruleset, out var rulesetHUDComponents) - ? rulesetHUDComponents.Concat(legacyHealthBars).ToArray() - : legacyHealthBars); - } - } - }); - - break; - } } } diff --git a/osu.Game/Skinning/SkinLayoutInfo.cs b/osu.Game/Skinning/SkinLayoutInfo.cs index 4eee1cac5a..bf6c693621 100644 --- a/osu.Game/Skinning/SkinLayoutInfo.cs +++ b/osu.Game/Skinning/SkinLayoutInfo.cs @@ -26,10 +26,9 @@ namespace osu.Game.Skinning /// /// 0: Initial version of all skin layouts. /// 1: Moves existing combo counters from global to per-ruleset HUD targets. - /// 2: Moves existing legacy health bars from global to per-ruleset HUD targets, and to playfield target on mania. /// /// - public const int LATEST_VERSION = 2; + public const int LATEST_VERSION = 1; [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] public int Version = LATEST_VERSION;