Add chat notification audio override

This commit is contained in:
D1GQ committed 2026-04-07 16:47:47 -05:00
1 parent aee57340e0
commit 27740950e6
2 files changed
+12

No files matched your search

+2
View File
@@ -17,6 +17,8 @@ internal static class AudioOverrideManager
internal static readonly AudioOverrideData Music_LobbySong = new("Music", "LobbySong.wav");
internal static readonly AudioOverrideData Sounds_ChatNotification = new("Sounds/Chat", "ChatNotification.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
@@ -38,6 +38,16 @@ internal static class AudioOverridePatch
}
}
[HarmonyPatch(typeof(ChatController), nameof(ChatController.Awake))]
[HarmonyPrefix]
private static void ChatController_Awake_Prefix(ChatController __instance)
{
if (AudioOverrideManager.Sounds_ChatNotification.TryGetAudioClip(out var audio))
{
__instance.messageSound = audio;
}
}
[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Awake))]
[HarmonyPrefix]
private static void MeetingHud_Awake_Prefix(MeetingHud __instance)