mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
further cleanup of repo
This commit is contained in:
parent
4f8dcb0cd0
commit
323eb92f2e
140 changed files with 1 additions and 2430 deletions
|
@ -1,54 +0,0 @@
|
|||
using MelonLoader;
|
||||
using NAK.ChatBoxExtensions.InputModules;
|
||||
|
||||
namespace NAK.ChatBoxExtensions;
|
||||
|
||||
public class ChatBoxExtensions : MelonMod
|
||||
{
|
||||
internal static MelonLogger.Instance Logger;
|
||||
internal static InputModuleChatBoxExtensions InputModule = new();
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Logger = LoggerInstance;
|
||||
|
||||
if (RegisteredMelons.All(it => it.Info.Name != "ChatBox"))
|
||||
{
|
||||
Logger.Error("ChatBox was not found!");
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyIntegrations();
|
||||
}
|
||||
|
||||
private void ApplyIntegrations()
|
||||
{
|
||||
|
||||
Integrations.Commands.InitializeCommandHandlers();
|
||||
Integrations.ChatBoxCommands.RegisterCommands();
|
||||
|
||||
Integrations.ChilloutVRBaseCommands.RegisterCommands();
|
||||
Integrations.ChilloutVRAASCommands.RegisterCommands();
|
||||
Integrations.ChilloutVRInputCommands.RegisterCommands();
|
||||
|
||||
ApplyPatches(typeof(HarmonyPatches.CVRInputManagerPatches));
|
||||
|
||||
if (RegisteredMelons.Any(it => it.Info.Name == "PlayerRagdollMod"))
|
||||
{
|
||||
Integrations.PlayerRagdollModCommands.RegisterCommands();
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Msg($"Failed while patching {type.Name}!");
|
||||
Logger.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue