2024-10-02 14:41:20 +08:00
|
|
|
|
using DB;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
|
|
|
|
|
namespace AquaMai.CustomKeyMap;
|
2024-10-02 00:52:37 +08:00
|
|
|
|
|
|
|
|
|
public class Enable
|
|
|
|
|
{
|
2024-10-02 14:41:20 +08:00
|
|
|
|
[HarmonyPatch(typeof(JvsButtonTableRecord), MethodType.Constructor, typeof(int), typeof(string), typeof(string), typeof(int), typeof(string), typeof(int), typeof(int), typeof(int))]
|
|
|
|
|
[HarmonyPostfix]
|
|
|
|
|
public static void JvsButtonTableRecordConstructor(JvsButtonTableRecord __instance, string Name)
|
|
|
|
|
{
|
2024-10-28 05:56:54 +08:00
|
|
|
|
var prop = (DB.KeyCodeID)typeof(Config).GetProperty(Name).GetValue(AquaMai.AppConfig.CustomKeyMap);
|
2024-10-02 14:41:20 +08:00
|
|
|
|
__instance.SubstituteKey = prop;
|
|
|
|
|
}
|
|
|
|
|
}
|