From 01f3a2dd142d9906ed2603ae520ff5980c84af54 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Wed, 27 Nov 2024 06:12:49 -0500 Subject: [PATCH] Move non-legacy conditional reasoning to migration code --- osu.Game.Tests/Skins/TestSceneSkinMigration.cs | 7 ------- osu.Game/Skinning/Skin.cs | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/osu.Game.Tests/Skins/TestSceneSkinMigration.cs b/osu.Game.Tests/Skins/TestSceneSkinMigration.cs index b376938e22..baee5ec2f4 100644 --- a/osu.Game.Tests/Skins/TestSceneSkinMigration.cs +++ b/osu.Game.Tests/Skins/TestSceneSkinMigration.cs @@ -199,13 +199,6 @@ namespace osu.Game.Tests.Skins }); }); - // One may argue that if a LegacyHealthDisplay exists in a non-legacy skin, - // then it should be swapped with the mania variant similar to legacy skins. - // This is not simple to achieve as we have to be aware of the presence of - // the health display in the HUD layout while migrating the Playfield layout, - // which is impossible with the current structure of skin layout migration. - // Instead, don't touch any non-legacy skin and call it a day. - // HUD AddAssert("health display still in global HUD", () => { diff --git a/osu.Game/Skinning/Skin.cs b/osu.Game/Skinning/Skin.cs index 19b06da432..5f046959af 100644 --- a/osu.Game/Skinning/Skin.cs +++ b/osu.Game/Skinning/Skin.cs @@ -343,7 +343,15 @@ namespace osu.Game.Skinning case GlobalSkinnableContainers.Playfield: if (!isLegacySkin) + { + // One may argue that if a LegacyHealthDisplay exists in a non-legacy skin, + // then it should be swapped with the mania variant similar to legacy skins. + // This is not simple to achieve as we have to be aware of the presence of + // the health display in the HUD layout while migrating the Playfield layout, + // which is impossible with the current structure of skin layout migration. + // Instead, don't touch any non-legacy skin and call it a day. break; + } resources.RealmAccess.Run(r => {