mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[NAK_CVR_MODS] some cleanup to repo
This commit is contained in:
parent
9944ad7611
commit
926cdcef66
16 changed files with 183964 additions and 1350 deletions
|
@ -1,5 +1,8 @@
|
|||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.Vivox;
|
||||
using ABI_RC.Core.Base;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Systems.Movement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.ChatBoxExtensions.Integrations;
|
||||
|
||||
|
@ -28,14 +31,87 @@ internal class ChilloutVRBaseCommands : CommandBase
|
|||
{
|
||||
LocalCommandIgnoreOthers(message, args =>
|
||||
{
|
||||
VivoxDeviceHandler.InputMuted = true;
|
||||
AudioManagement.SetMicrophoneActive(false);
|
||||
});
|
||||
},
|
||||
onCommandReceived: (sender, message, sound, displayMsg) =>
|
||||
{
|
||||
RemoteCommandListenForAll(message, args =>
|
||||
{
|
||||
VivoxDeviceHandler.InputMuted = false;
|
||||
AudioManagement.SetMicrophoneActive(false);
|
||||
});
|
||||
});
|
||||
|
||||
// teleport [x] [y] [z]
|
||||
Commands.RegisterCommand("teleport",
|
||||
onCommandSent: (message, sound, displayMsg) =>
|
||||
{
|
||||
LocalCommandIgnoreOthers(message, args =>
|
||||
{
|
||||
if (args.Length > 2 && float.TryParse(args[0], out float x) && float.TryParse(args[1], out float y) && float.TryParse(args[2], out float z))
|
||||
{
|
||||
BetterBetterCharacterController.Instance.TeleportPlayerTo(new Vector3(x, y, z), false, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
onCommandReceived: (sender, message, sound, displayMsg) =>
|
||||
{
|
||||
RemoteCommandListenForAll(message, args =>
|
||||
{
|
||||
if (args.Length > 2 && float.TryParse(args[0], out float x) && float.TryParse(args[1], out float y) && float.TryParse(args[2], out float z))
|
||||
{
|
||||
BetterBetterCharacterController.Instance.TeleportPlayerTo(new Vector3(x, y, z), false, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// tp [x] [y] [z]
|
||||
Commands.RegisterCommand("tp",
|
||||
onCommandSent: (message, sound, displayMsg) =>
|
||||
{
|
||||
LocalCommandIgnoreOthers(message, args =>
|
||||
{
|
||||
if (args.Length > 2 && float.TryParse(args[0], out float x) && float.TryParse(args[1], out float y) && float.TryParse(args[2], out float z))
|
||||
{
|
||||
BetterBetterCharacterController.Instance.TeleportPlayerTo(new Vector3(x, y, z), false, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
onCommandReceived: (sender, message, sound, displayMsg) =>
|
||||
{
|
||||
RemoteCommandListenForAll(message, args =>
|
||||
{
|
||||
if (args.Length > 2 && float.TryParse(args[0], out float x) && float.TryParse(args[1], out float y) && float.TryParse(args[2], out float z))
|
||||
{
|
||||
BetterBetterCharacterController.Instance.TeleportPlayerTo(new Vector3(x, y, z), false, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// teleport [player]
|
||||
Commands.RegisterCommand("teleport",
|
||||
onCommandSent: (message, sound, displayMsg) =>
|
||||
{
|
||||
LocalCommandIgnoreOthers(message, args =>
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
string player = args[0];
|
||||
CVRPlayerEntity playerEnt = CVRPlayerManager.Instance.NetworkPlayers.FirstOrDefault(x => x.Username == player);
|
||||
if (playerEnt != null) BetterBetterCharacterController.Instance.TeleportPlayerTo(playerEnt.PuppetMaster.transform.position, false, false);
|
||||
}
|
||||
});
|
||||
},
|
||||
onCommandReceived: (sender, message, sound, displayMsg) =>
|
||||
{
|
||||
RemoteCommandListenForAll(message, args =>
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
string player = args[0y];
|
||||
CVRPlayerEntity playerEnt = CVRPlayerManager.Instance.NetworkPlayers.FirstOrDefault(x => x.Username == player);
|
||||
if (playerEnt != null) BetterBetterCharacterController.Instance.TeleportPlayerTo(playerEnt.PuppetMaster.transform.position, false, false);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue