This commit is contained in:
NotAKidoS 2023-02-17 06:10:49 -06:00
parent 8a3523539b
commit 1e636e3395
13 changed files with 732 additions and 5 deletions

View file

@ -1,3 +1,4 @@
<<<<<<< Updated upstream
using ABI_RC.Core.Player;
using MelonLoader;
@ -55,5 +56,41 @@ public class DesktopVRSwitch : MelonMod
if (!DesktopVRSwitchHelper.Instance) return;
DesktopVRSwitchHelper.Instance.SettingTimedErrorCatch = m_entryTimedErrorCatch.Value;
DesktopVRSwitchHelper.Instance.SettingTimedErrorTimer = m_entryTimedErrorTimer.Value;
=======
using MelonLoader;
namespace NAK.Melons.DesktopVRSwitch;
public class DesktopVRSwitchMod : MelonMod
{
internal const string SettingsCategory = "DesktopVRSwitch";
internal static MelonPreferences_Category m_categoryDesktopVRSwitch;
internal static MelonLogger.Instance Logger;
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
m_categoryDesktopVRSwitch = MelonPreferences.CreateCategory(SettingsCategory);
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
ApplyPatches(typeof(HarmonyPatches.CVRPickupObjectPatches));
ApplyPatches(typeof(HarmonyPatches.CVRWorldPatches));
ApplyPatches(typeof(HarmonyPatches.CameraFacingObjectPatches));
ApplyPatches(typeof(HarmonyPatches.IKSystemPatches));
ApplyPatches(typeof(HarmonyPatches.MovementSystemPatches));
}
private void ApplyPatches(Type type)
{
try
{
HarmonyInstance.PatchAll(type);
}
catch (Exception e)
{
Logger.Msg($"Failed while patching {type.Name}!");
Logger.Error(e);
}
>>>>>>> Stashed changes
}
}