mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Add kill sound override
This commit is contained in:
1 parent
a85531b3eb
commit
c1441d41d0
2 files changed
+12
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user