mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
backport
This commit is contained in:
parent
8a3523539b
commit
1e636e3395
13 changed files with 732 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue