mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[RelativeSync] Initial Release
This commit is contained in:
parent
4f177633a4
commit
ca7df56e76
11 changed files with 647 additions and 0 deletions
38
RelativeSync/Main.cs
Normal file
38
RelativeSync/Main.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using MelonLoader;
|
||||
using NAK.RelativeSync.Networking;
|
||||
using NAK.RelativeSync.Patches;
|
||||
|
||||
namespace NAK.RelativeSync;
|
||||
|
||||
public class RelativeSyncMod : MelonMod
|
||||
{
|
||||
internal static MelonLogger.Instance Logger;
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Logger = LoggerInstance;
|
||||
|
||||
ModNetwork.Subscribe();
|
||||
|
||||
ApplyPatches(typeof(NetworkRootDataUpdatePatches));
|
||||
|
||||
ApplyPatches(typeof(PlayerSetupPatches));
|
||||
ApplyPatches(typeof(PuppetMasterPatches));
|
||||
|
||||
ApplyPatches(typeof(CVRSeatPatches));
|
||||
ApplyPatches(typeof(CVRMovementParentPatches));
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue