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()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,16 @@ namespace ml_bft
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
|
||||||
AssetsHandler.Load();
|
AssetsHandler.Load();
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator WaitForInstances()
|
IEnumerator WaitForInstances()
|
||||||
{
|
{
|
||||||
while(ABI_RC.Systems.InputManagement.CVRInputManager.Instance == null)
|
while(ABI_RC.Systems.InputManagement.CVRInputManager.Instance == null)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using ABI.CCK.Components;
|
using ABI.CCK.Components;
|
||||||
|
using ABI_RC.Core.InteractionSystem.Base;
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Systems.IK;
|
using ABI_RC.Systems.IK;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -51,7 +52,7 @@ namespace ml_lme
|
||||||
);
|
);
|
||||||
|
|
||||||
p_instance.Patch(
|
p_instance.Patch(
|
||||||
typeof(CVRPickupObject).GetMethod(nameof(CVRPickupObject.Grab), BindingFlags.Instance | BindingFlags.Public),
|
typeof(Pickupable).GetMethod(nameof(Pickupable.Grab), BindingFlags.Instance | BindingFlags.Public),
|
||||||
null,
|
null,
|
||||||
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnPickupGrab_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
|
new HarmonyLib.HarmonyMethod(typeof(GameEvents).GetMethod(nameof(OnPickupGrab_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,13 @@ namespace ml_lme
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
DependenciesHandler.ExtractDependencies();
|
DependenciesHandler.ExtractDependencies();
|
||||||
Settings.Init();
|
|
||||||
AssetsHandler.Load();
|
AssetsHandler.Load();
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,12 @@ namespace ml_pah
|
||||||
{
|
{
|
||||||
Settings.Init();
|
Settings.Init();
|
||||||
HistoryManager.Initialize();
|
HistoryManager.Initialize();
|
||||||
ModUi.Initialize();
|
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnDeinitializeMelon()
|
public override void OnLateInitializeMelon()
|
||||||
{
|
{
|
||||||
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.RemoveListener(this.OnLocalAvatarLoad);
|
ModUi.Initialize();
|
||||||
HistoryManager.OnEntriesUpdated.RemoveListener(this.OnHistoryEntriesUpdated);
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
|
|
||||||
ModUi.Shutdown();
|
|
||||||
HistoryManager.Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator WaitForRootLogic()
|
IEnumerator WaitForRootLogic()
|
||||||
|
|
@ -34,6 +29,15 @@ namespace ml_pah
|
||||||
HistoryManager.OnEntriesUpdated.AddListener(this.OnHistoryEntriesUpdated);
|
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()
|
public override void OnUpdate()
|
||||||
{
|
{
|
||||||
HistoryManager.Update();
|
HistoryManager.Update();
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,12 @@ namespace ml_pam
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,12 @@ namespace ml_pin
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
|
||||||
ResourcesHandler.ExtractAudioResources();
|
ResourcesHandler.ExtractAudioResources();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
MelonLoader.MelonCoroutines.Start(WaitForInstances());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,12 @@ namespace ml_pmc
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
Settings.Init();
|
||||||
ModUi.Init();
|
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
ModUi.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,12 @@ namespace ml_ppu
|
||||||
{
|
{
|
||||||
Settings.Init();
|
Settings.Init();
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
ModUi.Init();
|
|
||||||
ModSupport.Init();
|
ModSupport.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
ModUi.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,13 @@ namespace ml_prm
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
Settings.Init();
|
||||||
ModUi.Init();
|
|
||||||
GameEvents.Init(HarmonyInstance);
|
GameEvents.Init(HarmonyInstance);
|
||||||
WorldManager.Init();
|
WorldManager.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
ModUi.Init();
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForWhitelist());
|
MelonLoader.MelonCoroutines.Start(WaitForWhitelist());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ using ABI.CCK.Components;
|
||||||
using ABI_RC.Core;
|
using ABI_RC.Core;
|
||||||
using ABI_RC.Core.InteractionSystem;
|
using ABI_RC.Core.InteractionSystem;
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
|
using ABI_RC.Core.UI.UIRework.Managers;
|
||||||
using ABI_RC.Systems.GameEventSystem;
|
using ABI_RC.Systems.GameEventSystem;
|
||||||
using ABI_RC.Systems.IK;
|
using ABI_RC.Systems.IK;
|
||||||
using ABI_RC.Systems.IK.SubSystems;
|
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))
|
if((m_avatarRagdollToggle != null) && m_avatarRagdollToggle.isActiveAndEnabled && m_avatarRagdollToggle.shouldOverride && (m_ragdolled != m_avatarRagdollToggle.isOn))
|
||||||
SwitchRagdoll();
|
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();
|
SwitchRagdoll();
|
||||||
|
|
||||||
if(m_ragdolled && CVRInputManager.Instance.jump && Settings.JumpRecover)
|
if(m_ragdolled && CVRInputManager.Instance.jump && Settings.JumpRecover)
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ namespace ml_vei
|
||||||
{
|
{
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Settings.Init();
|
|
||||||
|
|
||||||
HarmonyInstance.Patch(
|
HarmonyInstance.Patch(
|
||||||
typeof(CVRXRModule).GetMethod("Update_Gestures_Vive", BindingFlags.Instance | BindingFlags.NonPublic),
|
typeof(CVRXRModule).GetMethod("Update_Gestures_Vive", BindingFlags.Instance | BindingFlags.NonPublic),
|
||||||
null,
|
null,
|
||||||
|
|
@ -18,6 +16,11 @@ namespace ml_vei
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
Settings.Init();
|
||||||
|
}
|
||||||
|
|
||||||
static void OnViveGesturesUpdate_Postfix(ref CVRXRModule __instance)
|
static void OnViveGesturesUpdate_Postfix(ref CVRXRModule __instance)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue