Skip to content

Commit

Permalink
IsMuted moved to AudioSystem in 2024.4.15.1407
Browse files Browse the repository at this point in the history
  • Loading branch information
XDelta committed Apr 16, 2024
1 parent ba18288 commit 586dba1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ResonitePTTKeybinds/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Delta")]
[assembly: AssemblyProduct("ResonitePTTKeybinds")]
[assembly: AssemblyCopyright("Copyright © Delta 2023")]
[assembly: AssemblyCopyright("Copyright © Delta 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
[assembly: AssemblyVersion("1.5.0")]
[assembly: AssemblyFileVersion("1.5.0")]
12 changes: 6 additions & 6 deletions ResonitePTTKeybinds/ResonitePTTKeybinds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace ResonitePTTKeybinds;
public class ResonitePTTKeybinds : ResoniteMod {
public override string Name => "PTT Keybinds";
public override string Author => "Delta";
public override string Version => "1.4.0";
public override string Version => "1.5.0";
public override string Link => "https://github.com/XDelta/ResonitePTTKeybinds";

//TODO keycode config for rebinding activation keys
Expand Down Expand Up @@ -98,34 +98,34 @@ static void Postfix(VoiceModeSync __instance) {
return;
}
if (__instance.InputInterface.GetKeyDown(Config.GetValue(MuteKey))) {
__instance.InputInterface.IsMuted = true;
__instance.AudioSystem.IsMuted = true;
Debug("Mute Keybind pressed: " + Config.GetValue(MuteKey));
}
if (__instance.InputInterface.GetKeyDown(Config.GetValue(WhisperKey))) {
if (VoiceMode.Whisper <= __instance.FocusedWorldMaxAllowedVoiceMode.Value) {
__instance.FocusedWorldVoiceMode.Value = VoiceMode.Whisper;
__instance.InputInterface.IsMuted = false;
__instance.AudioSystem.IsMuted = false;
Debug("Whisper Keybind pressed: " + Config.GetValue(WhisperKey));
}
}
if (__instance.InputInterface.GetKeyDown(Config.GetValue(NormalKey))) {
if (VoiceMode.Normal <= __instance.FocusedWorldMaxAllowedVoiceMode.Value) {
__instance.FocusedWorldVoiceMode.Value = VoiceMode.Normal;
__instance.InputInterface.IsMuted = false;
__instance.AudioSystem.IsMuted = false;
Debug("Normal Keybind pressed: " + Config.GetValue(NormalKey));
}
}
if (__instance.InputInterface.GetKeyDown(Config.GetValue(ShoutKey))) {
if (VoiceMode.Shout <= __instance.FocusedWorldMaxAllowedVoiceMode.Value) {
__instance.FocusedWorldVoiceMode.Value = VoiceMode.Shout;
__instance.InputInterface.IsMuted = false;
__instance.AudioSystem.IsMuted = false;
Debug("Shout Keybind pressed: " + Config.GetValue(ShoutKey));
}
}
if (__instance.InputInterface.GetKeyDown(Config.GetValue(BroadcastKey))) {
if (VoiceMode.Broadcast <= __instance.FocusedWorldMaxAllowedVoiceMode.Value) {
__instance.FocusedWorldVoiceMode.Value = VoiceMode.Broadcast;
__instance.InputInterface.IsMuted = false;
__instance.AudioSystem.IsMuted = false;
Debug("Broadcast Keybind pressed: " + Config.GetValue(BroadcastKey));
}
}
Expand Down

0 comments on commit 586dba1

Please sign in to comment.