mirror of
https://github.com/hykilpikonna/AquaDX.git
synced 2026-08-07 19:47:09 -05:00
[+] quickerRetry
This commit is contained in:
parent
5bce67feea
commit
bc321c9330
|
|
@ -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<GamePlayManager>.Instance.SetQuickRetryFrag(flag: true);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user