From ad842b60f5416c83edf0f341575bd80572465b58 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Fri, 8 Mar 2024 21:43:18 +0900 Subject: [PATCH 1/2] 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; } From 27d78fdb087e0be54973ab40fb02818e747b9e62 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Sat, 9 Mar 2024 01:10:28 +0900 Subject: [PATCH 2/2] Add fallback to find spinner samples without a bank prefix --- osu.Game/Audio/HitSampleInfo.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game/Audio/HitSampleInfo.cs b/osu.Game/Audio/HitSampleInfo.cs index 24cb1730bf..f9c93d72ff 100644 --- a/osu.Game/Audio/HitSampleInfo.cs +++ b/osu.Game/Audio/HitSampleInfo.cs @@ -80,6 +80,8 @@ namespace osu.Game.Audio yield return $"Gameplay/{Bank}-{Name}{Suffix}"; yield return $"Gameplay/{Bank}-{Name}"; + + yield return $"Gameplay/{Name}"; } }