From bc321c933038001cf4e25bf86ec1b8fae49acda0 Mon Sep 17 00:00:00 2001 From: Clansty Date: Sun, 28 Sep 2025 21:02:48 +0800 Subject: [PATCH] [+] quickerRetry --- AquaMai.Mods/GameSystem/QuickRetry.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/AquaMai.Mods/GameSystem/QuickRetry.cs b/AquaMai.Mods/GameSystem/QuickRetry.cs index 28d1d705..b99eb980 100644 --- a/AquaMai.Mods/GameSystem/QuickRetry.cs +++ b/AquaMai.Mods/GameSystem/QuickRetry.cs @@ -1,6 +1,7 @@ using AquaMai.Core.Attributes; using AquaMai.Config.Attributes; using HarmonyLib; +using MAI2.Util; using Manager; namespace AquaMai.Mods.GameSystem; @@ -18,6 +19,11 @@ public class QuickRetry zh: "在宴谱中强制启用")] private static readonly bool enableInUtage = false; + [ConfigEntry( + en: "Make quick retry faster.", + zh: "将长按时间修改为 0.5 秒")] + private static readonly bool quickerRetry = false; + [HarmonyPrefix] [HarmonyPatch(typeof(Monitor.QuickRetry), "IsQuickRetryEnable")] public static bool OnQuickRetryIsQuickRetryEnable(ref bool __result) @@ -33,4 +39,13 @@ public class QuickRetry } return false; } -} + + [HarmonyPostfix] + [HarmonyPatch(typeof(Monitor.QuickRetry), "Execute")] + [EnableIf(nameof(quickerRetry))] + public static void ExecutePostfix(double ____pushTimer) + { + if (____pushTimer < 500) return; + Singleton.Instance.SetQuickRetryFrag(flag: true); + } +} \ No newline at end of file