mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
work in progress
This commit is contained in:
1 parent
052c23d3b7
commit
ee812bbc79
2 files changed
+137
-1
No files matched your search
@@ -0,0 +1,20 @@
|
||||
using BepInEx.Bootstrap;
|
||||
using CommonAPI;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UXAssist.ModsCompat;
|
||||
|
||||
public static class CommonAPIWrapper
|
||||
{
|
||||
public static void Run(Harmony harmony)
|
||||
{
|
||||
if (!Chainloader.PluginInfos.TryGetValue(CommonAPIPlugin.GUID, out var commonAPIPlugin) ||
|
||||
commonAPIPlugin.Metadata.Version > new System.Version(1, 6, 7, 0)) return;
|
||||
harmony.Patch(AccessTools.Method(typeof(GameOption), nameof(GameOption.InitKeys)), new HarmonyMethod(typeof(CommonAPIWrapper), nameof(PatchInitKeys)));
|
||||
}
|
||||
|
||||
public static bool PatchInitKeys(GameOption __instance)
|
||||
{
|
||||
return __instance.overrideKeys == null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user