mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
Add chat notification audio override
This commit is contained in:
1 parent
aee57340e0
commit
27740950e6
2 files changed
+12
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user