NAK_CVR_Mods/ChatBoxExtensions/Integrations/ChilloutVRBase.cs
2023-08-14 19:34:13 +01:00

42 lines
1.1 KiB
C#

using ABI_RC.Core;
using ABI_RC.Core.Vivox;
namespace NAK.ChatBoxExtensions.Integrations;
internal class ChilloutVRBaseCommands : CommandBase
{
public static void RegisterCommands()
{
Commands.RegisterCommand("respawn",
onCommandSent: (message, sound, displayMsg) =>
{
LocalCommandIgnoreOthers(message, args =>
{
RootLogic.Instance.Respawn();
});
},
onCommandReceived: (sender, message, sound, displayMsg) =>
{
RemoteCommandListenForAll(message, (args) =>
{
RootLogic.Instance.Respawn();
});
});
Commands.RegisterCommand("mute",
onCommandSent: (message, sound, displayMsg) =>
{
LocalCommandIgnoreOthers(message, args =>
{
VivoxDeviceHandler.InputMuted = true;
});
},
onCommandReceived: (sender, message, sound, displayMsg) =>
{
RemoteCommandListenForAll(message, args =>
{
VivoxDeviceHandler.InputMuted = false;
});
});
}
}