From 29505fa4a3c1ec7ed5b69a1ec7782414a8b068b8 Mon Sep 17 00:00:00 2001 From: Clansty Date: Wed, 15 May 2024 23:29:42 +0800 Subject: [PATCH] [F] Disable 2P music --- AquaMai/UX/RandomBgm.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/AquaMai/UX/RandomBgm.cs b/AquaMai/UX/RandomBgm.cs index 545649e3..43ebe35b 100644 --- a/AquaMai/UX/RandomBgm.cs +++ b/AquaMai/UX/RandomBgm.cs @@ -57,5 +57,23 @@ namespace AquaMai.UX return; } } + + [HarmonyPrefix] + [HarmonyPatch(typeof(SoundManager), "PlayBGM")] + public static bool PrePlayBGM(ref int target) + { + switch (target) + { + case 0: + return true; + case 1: + return false; + case 2: + target = 0; + return true; + default: + return false; + } + } } } \ No newline at end of file