From c1441d41d0582e76eee2f54d6dd8cbe80e0da613 Mon Sep 17 00:00:00 2001 From: D1GQ Date: Thu, 11 Jun 2026 16:49:33 -0500 Subject: [PATCH] Add kill sound override --- src/Managers/AudioOverrideManager.cs | 2 ++ src/Patches/Client/AudioOverridePatch.cs | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Managers/AudioOverrideManager.cs b/src/Managers/AudioOverrideManager.cs index 4be921b..e606f7d 100644 --- a/src/Managers/AudioOverrideManager.cs +++ b/src/Managers/AudioOverrideManager.cs @@ -19,6 +19,8 @@ internal static class AudioOverrideManager internal static readonly AudioOverrideData Sounds_ChatNotification = new("Sounds/Chat", "ChatNotification.wav"); + internal static readonly AudioOverrideData Sounds_Kill = new("Sounds/Gameplay", "Kill.wav"); + internal static readonly MapAudioOverrideData Sounds_VentEnter = new("Sounds/Gameplay", "VentEnter.wav"); internal static readonly MapAudioOverrideData Sounds_VentExit = new("Sounds/Gameplay", "VentExit.wav"); diff --git a/src/Patches/Client/AudioOverridePatch.cs b/src/Patches/Client/AudioOverridePatch.cs index 622e844..99d0289 100644 --- a/src/Patches/Client/AudioOverridePatch.cs +++ b/src/Patches/Client/AudioOverridePatch.cs @@ -68,6 +68,16 @@ internal static class AudioOverridePatch } } + [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.Awake))] + [HarmonyPostfix] + private static void PlayerControl_Awake_Postfix(PlayerControl __instance) + { + if (AudioOverrideManager.Sounds_Kill.TryGetAudioClip(out var audio)) + { + __instance.KillSfx = audio; + } + } + [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.Awake))] [HarmonyPostfix] private static void ShipStatus_Awake_Postfix(ShipStatus __instance)