mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-05-03 17:07:00 +00:00
Fix for MelonLoader 0.7.1
This commit is contained in:
parent
f8fa7e60f9
commit
92fc568e16
12 changed files with 54 additions and 20 deletions
|
|
@ -9,9 +9,12 @@ namespace ml_amt
|
|||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,16 @@ namespace ml_bft
|
|||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
AssetsHandler.Load();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
||||
}
|
||||
|
||||
IEnumerator WaitForInstances()
|
||||
{
|
||||
while(ABI_RC.Systems.InputManagement.CVRInputManager.Instance == null)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Core.InteractionSystem.Base;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Systems.IK;
|
||||
using System;
|
||||
|
|
@ -51,7 +52,7 @@ namespace ml_lme
|
|||
);
|
||||
|
||||
p_instance.Patch(
|
||||
typeof(CVRPickupObject).GetMethod(nameof(CVRPickupObject.Grab), BindingFlags.Instance | BindingFlags.Public),
|
||||
typeof(Pickupable).GetMethod(nameof(Pickupable.Grab), BindingFlags.Instance | BindingFlags.Public),
|
||||
null,
|
||||
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnPickupGrab_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
|
||||
);
|
||||
|
|
|
|||
|
|
@ -11,10 +11,13 @@ namespace ml_lme
|
|||
public override void OnInitializeMelon()
|
||||
{
|
||||
DependenciesHandler.ExtractDependencies();
|
||||
Settings.Init();
|
||||
AssetsHandler.Load();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,17 +12,12 @@ namespace ml_pah
|
|||
{
|
||||
Settings.Init();
|
||||
HistoryManager.Initialize();
|
||||
ModUi.Initialize();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
public override void OnDeinitializeMelon()
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(this.OnLocalAvatarLoad);
|
||||
HistoryManager.OnEntriesUpdated.RemoveListener(this.OnHistoryEntriesUpdated);
|
||||
|
||||
ModUi.Shutdown();
|
||||
HistoryManager.Shutdown();
|
||||
ModUi.Initialize();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
IEnumerator WaitForRootLogic()
|
||||
|
|
@ -34,6 +29,15 @@ namespace ml_pah
|
|||
HistoryManager.OnEntriesUpdated.AddListener(this.OnHistoryEntriesUpdated);
|
||||
}
|
||||
|
||||
public override void OnDeinitializeMelon()
|
||||
{
|
||||
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(this.OnLocalAvatarLoad);
|
||||
HistoryManager.OnEntriesUpdated.RemoveListener(this.OnHistoryEntriesUpdated);
|
||||
|
||||
ModUi.Shutdown();
|
||||
HistoryManager.Shutdown();
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
HistoryManager.Update();
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@ namespace ml_pam
|
|||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,12 @@ namespace ml_pin
|
|||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
ResourcesHandler.ExtractAudioResources();
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,12 @@ namespace ml_pmc
|
|||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
ModUi.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
ModUi.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,12 @@ namespace ml_ppu
|
|||
{
|
||||
Settings.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
ModUi.Init();
|
||||
ModSupport.Init();
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
ModUi.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,13 @@ namespace ml_prm
|
|||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
ModUi.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
WorldManager.Init();
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
ModUi.Init();
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
MelonLoader.MelonCoroutines.Start(WaitForWhitelist());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using ABI.CCK.Components;
|
|||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.UI.UIRework.Managers;
|
||||
using ABI_RC.Systems.GameEventSystem;
|
||||
using ABI_RC.Systems.IK;
|
||||
using ABI_RC.Systems.IK.SubSystems;
|
||||
|
|
@ -217,7 +218,7 @@ namespace ml_prm
|
|||
if((m_avatarRagdollToggle != null) && m_avatarRagdollToggle.isActiveAndEnabled && m_avatarRagdollToggle.shouldOverride && (m_ragdolled != m_avatarRagdollToggle.isOn))
|
||||
SwitchRagdoll();
|
||||
|
||||
if(Settings.Hotkey && Input.GetKeyDown(Settings.HotkeyKey) && !ViewManager.Instance.IsAnyMenuOpen)
|
||||
if(Settings.Hotkey && Input.GetKeyDown(Settings.HotkeyKey) && !ViewManager.Instance.IsAnyMenuOpen && !KeyboardManager.Instance.IsViewShown)
|
||||
SwitchRagdoll();
|
||||
|
||||
if(m_ragdolled && CVRInputManager.Instance.jump && Settings.JumpRecover)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ namespace ml_vei
|
|||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
|
||||
HarmonyInstance.Patch(
|
||||
typeof(CVRXRModule).GetMethod("Update_Gestures_Vive", BindingFlags.Instance | BindingFlags.NonPublic),
|
||||
null,
|
||||
|
|
@ -18,6 +16,11 @@ namespace ml_vei
|
|||
);
|
||||
}
|
||||
|
||||
public override void OnLateInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
}
|
||||
|
||||
static void OnViveGesturesUpdate_Postfix(ref CVRXRModule __instance)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue