Add kill sound override

This commit is contained in:
D1GQ committed 2026-06-11 16:49:33 -05:00
1 parent a85531b3eb
commit c1441d41d0
2 files changed
+12

No files matched your search

+2
View File
@@ -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");
+10
View File
@@ -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)