mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-09 12:37:27 +08:00
[+] Totally disable and hide timer + fix side effects when ExtendTimer is on
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
using Manager;
|
using Manager;
|
||||||
using Monitor;
|
using Monitor;
|
||||||
using Process;
|
using Process;
|
||||||
|
using Process.Entry.State;
|
||||||
|
using Process.ModeSelect;
|
||||||
|
|
||||||
namespace AquaMai.UX
|
namespace AquaMai.UX
|
||||||
{
|
{
|
||||||
@@ -11,19 +13,44 @@ namespace AquaMai.UX
|
|||||||
[HarmonyPatch(typeof(TimerController), "PrepareTimer")]
|
[HarmonyPatch(typeof(TimerController), "PrepareTimer")]
|
||||||
public static void PrePrepareTimer(ref int second)
|
public static void PrePrepareTimer(ref int second)
|
||||||
{
|
{
|
||||||
second = 200;
|
second = 65535;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(CommonTimer), "SetVisible")]
|
||||||
|
public static void CommonTimerSetVisible(ref bool isVisible)
|
||||||
|
{
|
||||||
|
isVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(EntryProcess), "DecrementTimerSecond")]
|
||||||
|
public static bool EntryProcessDecrementTimerSecond(ContextEntry ____context)
|
||||||
|
{
|
||||||
|
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_SYS_SKIP, 0);
|
||||||
|
____context.SetState(StateType.DoneEntry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(ModeSelectProcess), "UpdateInput")]
|
||||||
|
public static bool ModeSelectProcessUpdateInput(ModeSelectProcess __instance)
|
||||||
|
{
|
||||||
|
if (!InputManager.GetButtonDown(0, InputManager.ButtonSetting.Button05)) return true;
|
||||||
|
__instance.TimeSkipButtonAnim(InputManager.ButtonSetting.Button05);
|
||||||
|
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_SYS_SKIP, 0);
|
||||||
|
Traverse.Create(__instance).Method("TimeUp").GetValue();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(PhotoEditProcess), "MainMenuUpdate")]
|
[HarmonyPatch(typeof(PhotoEditProcess), "MainMenuUpdate")]
|
||||||
public static void PhotoEditProcess(PhotoEditMonitor[] ____monitors, ProcessDataContainer ___container)
|
public static void PhotoEditProcess(PhotoEditMonitor[] ____monitors, PhotoEditProcess __instance)
|
||||||
{
|
{
|
||||||
if (InputManager.GetButtonDown(0, InputManager.ButtonSetting.Button04))
|
if (!InputManager.GetButtonDown(0, InputManager.ButtonSetting.Button04)) return;
|
||||||
{
|
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_SYS_SKIP, 0);
|
||||||
___container.processManager.DecrementTime(0, 200);
|
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
|
||||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_SYS_SKIP, 0);
|
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
|
||||||
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user