mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 07:57:26 +08:00
[RF] AquaMai configuration refactor (#82)
更新了配置文件格式,原有的配置文件将被自动无缝迁移,详情请见新的配置文件中的注释(例外:`SlideJudgeTweak` 不再默认启用) 旧配置文件将被重命名备份,如果更新到此版本遇到 Bug 请联系我们 Updated configuration file schema. The old config file will be migrated automatically and seamlessly. See the comments in the new configuration file for details. (Except for `SlideJudgeTweak` is no longer enabled by default) Your old configuration file will be renamed as a backup. If you encounter any bug with this version, please contact us.
This commit is contained in:
80
AquaMai/AquaMai.Mods/GameSystem/KeyMap.cs
Normal file
80
AquaMai/AquaMai.Mods/GameSystem/KeyMap.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using System.Reflection;
|
||||
using AquaMai.Config.Attributes;
|
||||
using AquaMai.Config.Types;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace AquaMai.Mods.GameSystem;
|
||||
|
||||
[ConfigSection(
|
||||
en: "These settings will work regardless of whether you have enabled segatools' io4 emulation.",
|
||||
zh: "这里的设置无论你是否启用了 segatools 的 io4 模拟都会工作")]
|
||||
public class KeyMap
|
||||
{
|
||||
[ConfigEntry]
|
||||
public static readonly KeyCodeID Test = (KeyCodeID)115;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Service = (KeyCodeID)5;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button1_1P = (KeyCodeID)67;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button2_1P = (KeyCodeID)49;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button3_1P = (KeyCodeID)48;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button4_1P = (KeyCodeID)47;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button5_1P = (KeyCodeID)68;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button6_1P = (KeyCodeID)70;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button7_1P = (KeyCodeID)45;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button8_1P = (KeyCodeID)61;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Select_1P = (KeyCodeID)25;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button1_2P = (KeyCodeID)80;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button2_2P = (KeyCodeID)81;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button3_2P = (KeyCodeID)78;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button4_2P = (KeyCodeID)75;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button5_2P = (KeyCodeID)74;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button6_2P = (KeyCodeID)73;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button7_2P = (KeyCodeID)76;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Button8_2P = (KeyCodeID)79;
|
||||
|
||||
[ConfigEntry]
|
||||
private static readonly KeyCodeID Select_2P = (KeyCodeID)84;
|
||||
|
||||
[HarmonyPatch(typeof(DB.JvsButtonTableRecord), MethodType.Constructor, typeof(int), typeof(string), typeof(string), typeof(int), typeof(string), typeof(int), typeof(int), typeof(int))]
|
||||
[HarmonyPostfix]
|
||||
public static void JvsButtonTableRecordConstructor(DB.JvsButtonTableRecord __instance, string Name)
|
||||
{
|
||||
var prop = (DB.KeyCodeID)typeof(KeyMap).GetField(Name, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static).GetValue(null);
|
||||
__instance.SubstituteKey = prop;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user