mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-08 00:59:17 +00:00
[PathCamDisabler] New input module changes.
This commit is contained in:
parent
9a36450d8f
commit
ced3f26e8d
2 changed files with 44 additions and 25 deletions
26
PathCamDisabler/HarmonyPatches.cs
Normal file
26
PathCamDisabler/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using ABI_RC.Core.IO;
|
||||
using ABI_RC.Systems.InputManagement.InputModules;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace NAK.PathCamDisabler.HarmonyPatches;
|
||||
|
||||
class CVRPathCamControllerPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRPathCamController), nameof(CVRPathCamController.Start))]
|
||||
private static void Postfix_CVRPathCamController_Start()
|
||||
{
|
||||
PathCamDisabler.OnUpdateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
class CVRInputModule_KeyboardPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRInputModule_Keyboard), nameof(CVRInputModule_Keyboard.Update_Binds))]
|
||||
private static void Postfix_CVRInputModule_Keyboard_Update_Binds(ref CVRInputModule_Keyboard __instance)
|
||||
{
|
||||
if (PathCamDisabler.EntryDisableFlightBind.Value)
|
||||
__instance._inputManager.toggleFlight = false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue