From ad842b60f5416c83edf0f341575bd80572465b58 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Fri, 8 Mar 2024 21:43:18 +0900 Subject: [PATCH] Add support for Argon hitsounds --- osu.Game/Skinning/ArgonProSkin.cs | 6 ++++-- osu.Game/Skinning/ArgonSkin.cs | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game/Skinning/ArgonProSkin.cs b/osu.Game/Skinning/ArgonProSkin.cs index b753dd8fbe..6ec9945c0e 100644 --- a/osu.Game/Skinning/ArgonProSkin.cs +++ b/osu.Game/Skinning/ArgonProSkin.cs @@ -24,9 +24,11 @@ namespace osu.Game.Skinning { foreach (string lookup in sampleInfo.LookupNames) { - string remappedLookup = lookup.Replace(@"Gameplay/", @"Gameplay/ArgonPro/"); + var sample = Samples?.Get(lookup) + ?? Resources.AudioManager?.Samples.Get(lookup.Replace(@"Gameplay/", @"Gameplay/ArgonPro/")) + ?? Resources.AudioManager?.Samples.Get(lookup.Replace(@"Gameplay/", @"Gameplay/Argon/")) + ?? Resources.AudioManager?.Samples.Get(lookup); - var sample = Samples?.Get(remappedLookup) ?? Resources.AudioManager?.Samples.Get(remappedLookup); if (sample != null) return sample; } diff --git a/osu.Game/Skinning/ArgonSkin.cs b/osu.Game/Skinning/ArgonSkin.cs index 953badaf65..8fd393fcc5 100644 --- a/osu.Game/Skinning/ArgonSkin.cs +++ b/osu.Game/Skinning/ArgonSkin.cs @@ -77,7 +77,10 @@ namespace osu.Game.Skinning { foreach (string lookup in sampleInfo.LookupNames) { - var sample = Samples?.Get(lookup) ?? Resources.AudioManager?.Samples.Get(lookup); + var sample = Samples?.Get(lookup) + ?? Resources.AudioManager?.Samples.Get(lookup.Replace(@"Gameplay/", @"Gameplay/Argon/")) + ?? Resources.AudioManager?.Samples.Get(lookup); + if (sample != null) return sample; }