[PropUndoButton] Attempt at fixing, is broken

This commit is contained in:
NotAKidoS 2023-05-17 14:23:49 -05:00
parent cfaf1e4b91
commit add93b07ec

View file

@ -3,6 +3,7 @@ using ABI_RC.Core.AudioEffects;
using ABI_RC.Core.Networking;
using ABI_RC.Core.Savior;
using ABI_RC.Core.Util;
using ABI_RC.Systems.InputManagement.InputModules;
using DarkRift;
using MelonLoader;
using System.Reflection;
@ -54,7 +55,7 @@ public class PropUndoButton : MelonMod
postfix: new HarmonyLib.HarmonyMethod(typeof(PropUndoButton).GetMethod(nameof(OnDeletePropByInstanceId), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch( // desktop input patch so we don't run in menus/gui
typeof(InputModuleMouseKeyboard).GetMethod(nameof(InputModuleMouseKeyboard.UpdateInput)),
typeof(CVRInputModule_Keyboard).GetMethod(nameof(CVRInputModule_Keyboard.UpdateInput)),
postfix: new HarmonyLib.HarmonyMethod(typeof(PropUndoButton).GetMethod(nameof(OnUpdateInput), BindingFlags.NonPublic | BindingFlags.Static))
);
HarmonyInstance.Patch( // clear redo list on world change