mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[IKAdjustments] Push latest changes
This commit is contained in:
parent
609afc37fc
commit
fee053bb64
6 changed files with 374 additions and 1 deletions
33
IKAdjustments/HarmonyPatches.cs
Normal file
33
IKAdjustments/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Systems.IK;
|
||||
using HarmonyLib;
|
||||
using NAK.IKAdjustments.Systems;
|
||||
|
||||
namespace NAK.IKAdjustments.HarmonyPatches;
|
||||
|
||||
internal static class IKSystemPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(IKSystem), nameof(IKSystem.Start))]
|
||||
private static void Postfix_IKSystem_Start(ref IKSystem __instance)
|
||||
{
|
||||
__instance.gameObject.AddComponent<IKAdjuster>();
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(IKSystem), nameof(IKSystem.ResetIkSettings))]
|
||||
private static void Postfix_IKSystem_ResetIkSettings()
|
||||
{
|
||||
IKAdjuster.Instance.ResetAllOffsets();
|
||||
}
|
||||
}
|
||||
|
||||
internal static class CVR_MenuManagerPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVR_MenuManager), nameof(CVR_MenuManager.ToggleQuickMenu), typeof(bool))]
|
||||
private static void Postfix_CVR_MenuManager_ToggleQuickMenu(bool show)
|
||||
{
|
||||
if (show) IKAdjuster.Instance.ExitAdjustMode();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue