[RelativeSync] Initial Release

This commit is contained in:
NotAKidoS 2024-05-22 04:19:48 -05:00
parent 4f177633a4
commit ca7df56e76
11 changed files with 647 additions and 0 deletions

38
RelativeSync/Main.cs Normal file
View 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);
}
}
}