From e07294b977ca78d6ed4004451ca4d89369b6ac5a Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 12:52:03 +0800 Subject: [PATCH 1/6] Delete files because the game changed --- Patches/VolumeSelectPatch.cs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 Patches/VolumeSelectPatch.cs diff --git a/Patches/VolumeSelectPatch.cs b/Patches/VolumeSelectPatch.cs deleted file mode 100644 index 5f17432..0000000 --- a/Patches/VolumeSelectPatch.cs +++ /dev/null @@ -1,20 +0,0 @@ -using HarmonyLib; -using Il2Cpp; -using UnityEngine.UI; - -namespace CustomHitSound.Patches; - -[HarmonyPatch(typeof(VolumeSelect), nameof(VolumeSelect.SetSelectImage))] -internal static class VolumeSelectPatch -{ - private static void Postfix(VolumeSelect __instance) - { - if (Setting.CurrentSfx == string.Empty) - { - return; - } - - var label = __instance.transform.GetChild(7, 2, 0); - label.GetComponent().text = Setting.CurrentSfx; - } -} \ No newline at end of file From 9697f79faaab86ca4e74f4ed9162a131a35724d7 Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 12:53:45 +0800 Subject: [PATCH 2/6] Added highlight after selected sound package --- Patches/BattleSfxSelectPatch.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Patches/BattleSfxSelectPatch.cs b/Patches/BattleSfxSelectPatch.cs index 8d79629..c50ec00 100644 --- a/Patches/BattleSfxSelectPatch.cs +++ b/Patches/BattleSfxSelectPatch.cs @@ -2,6 +2,7 @@ using Il2Cpp; using Il2CppAssets.Scripts.Database; using Il2CppAssets.Scripts.PeroTools.GeneralLocalization; +using UnityEngine; using UnityEngine.UI; using Object = UnityEngine.Object; @@ -89,11 +90,18 @@ private static void GenerateToggles(BattleSfxSelect __instance) var imgBg = toggle.transform.GetChild(0); var txt = imgBg.GetChild(1); Object.Destroy(txt.GetComponent()); - txt.GetComponent().text = sfxPackName; - + var textComp = txt.GetComponent(); + textComp.text = sfxPackName; + var toggleComp = toggle.GetComponent(); + var selectedItemHandle = toggle.GetComponent(); + var selectedColor = selectedItemHandle.selectedColor = new Color(1, 1, 1, 1); + var unSelectedColor = selectedItemHandle.unSelectedColor = new Color(0.996f, 0.651f, 0.854f, 1); toggleComp.onValueChanged.AddListener((Action)(selected => { + + textComp.color = selected ? selectedColor : unSelectedColor; + if (selected) { Setting.CurrentSfx = sfxPackName; @@ -108,7 +116,6 @@ private static void GenerateToggles(BattleSfxSelect __instance) })); toggleComp.SetIsOnWithoutNotify(Setting.CurrentSfx == sfxPackName); - __instance.m_BattleSfx.Add(toggleComp); } } From c281cb43c5d7e904b59462d22467f2a23b98c41a Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 14:05:37 +0800 Subject: [PATCH 3/6] update Mod Version --- AssemblyInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs index 0cbe08b..b737bb7 100644 --- a/AssemblyInfo.cs +++ b/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using Main = CustomHitSound.Main; -[assembly: AssemblyVersion("2.1.0")] -[assembly: AssemblyFileVersion("2.1.0")] -[assembly: MelonInfo(typeof(Main), "CustomHitSound", "2.1.0", "lxy")] +[assembly: AssemblyVersion("2.1.1")] +[assembly: AssemblyFileVersion("2.1.1")] +[assembly: MelonInfo(typeof(Main), "CustomHitSound", "2.1.1", "lxy")] [assembly: MelonGame("PeroPeroGames", "MuseDash")] \ No newline at end of file From adcbe591ca971aa48102bcc2d53fbe8e1d40ada8 Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 19:11:24 +0800 Subject: [PATCH 4/6] update version --- AssemblyInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs index b737bb7..3f4e8e6 100644 --- a/AssemblyInfo.cs +++ b/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using Main = CustomHitSound.Main; -[assembly: AssemblyVersion("2.1.1")] -[assembly: AssemblyFileVersion("2.1.1")] -[assembly: MelonInfo(typeof(Main), "CustomHitSound", "2.1.1", "lxy")] +[assembly: AssemblyVersion("2.1.2")] +[assembly: AssemblyFileVersion("2.1.2")] +[assembly: MelonInfo(typeof(Main), "CustomHitSound", "2.1.2", "lxy")] [assembly: MelonGame("PeroPeroGames", "MuseDash")] \ No newline at end of file From 19b742b0bad171608c3fafd56f5dd58a3d517e6d Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 19:12:24 +0800 Subject: [PATCH 5/6] update Prevent a return of -1 --- Patches/BattleSfxSelectPatch.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Patches/BattleSfxSelectPatch.cs b/Patches/BattleSfxSelectPatch.cs index c50ec00..cbbc7b7 100644 --- a/Patches/BattleSfxSelectPatch.cs +++ b/Patches/BattleSfxSelectPatch.cs @@ -39,6 +39,11 @@ private static void OnBattleSfxTogglePostfix(int index, bool isOn, BattleSfxSele checkmark.SetActive(false); var correctIndex = __instance.m_BattleSfx.FindIndex(new Func(x => x.name == $"Tgl{Setting.CurrentSfx}")); + if (correctIndex < 0) + { + Setting.CurrentSfx = string.Empty; + return; + } var correctImgBg = __instance.m_Content.GetChild(correctIndex).GetChild(0); __instance.m_BattleSfx[correctIndex].isOn = true; correctImgBg.GetComponent().color = __instance.highLight; From 5f66f90b06f5b347e61be55a72435ba5832b4f81 Mon Sep 17 00:00:00 2001 From: Doushabo <2824868962@qq.com> Date: Sat, 29 Aug 2026 22:56:41 +0800 Subject: [PATCH 6/6] Fixed an issue where the sound package was overwritten by Hoofbeat without 'sfx_press_horse' --- Patches/AudioManagerPatch.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Patches/AudioManagerPatch.cs b/Patches/AudioManagerPatch.cs index 381c0f9..79d0181 100644 --- a/Patches/AudioManagerPatch.cs +++ b/Patches/AudioManagerPatch.cs @@ -20,6 +20,10 @@ private static void Postfix(AudioManager __instance) var length = Setting.CurrentSfx.Length + 1; var sfxName = Path.GetFileNameWithoutExtension(sfxFilePath)[..^length]; var audioClip = Manager.Load(sfxFilePath); + if (sfxName == "sfx_press") + { + __instance.m_SfxBuffer["sfx_press_horse"] = audioClip; + } __instance.m_SfxBuffer[sfxName] = audioClip; }