2024-05-21 21:17:30 +08:00
|
|
|
|
using HarmonyLib;
|
2024-05-26 10:11:29 +08:00
|
|
|
|
using Manager;
|
|
|
|
|
using Monitor;
|
|
|
|
|
using Process;
|
2024-05-26 11:28:06 +08:00
|
|
|
|
using Process.Entry.State;
|
|
|
|
|
using Process.ModeSelect;
|
2024-05-21 21:17:30 +08:00
|
|
|
|
|
|
|
|
|
namespace AquaMai.UX
|
|
|
|
|
{
|
|
|
|
|
public class ExtendTimer
|
|
|
|
|
{
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(TimerController), "PrepareTimer")]
|
|
|
|
|
public static void PrePrepareTimer(ref int second)
|
|
|
|
|
{
|
2024-05-26 11:28:06 +08:00
|
|
|
|
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;
|
2024-05-21 21:17:30 +08:00
|
|
|
|
}
|
2024-05-26 10:11:29 +08:00
|
|
|
|
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(PhotoEditProcess), "MainMenuUpdate")]
|
2024-05-26 11:28:06 +08:00
|
|
|
|
public static void PhotoEditProcess(PhotoEditMonitor[] ____monitors, PhotoEditProcess __instance)
|
2024-05-26 10:11:29 +08:00
|
|
|
|
{
|
2024-05-26 11:28:06 +08:00
|
|
|
|
if (!InputManager.GetButtonDown(0, InputManager.ButtonSetting.Button04)) return;
|
|
|
|
|
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_SYS_SKIP, 0);
|
|
|
|
|
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
|
|
|
|
|
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
|
2024-05-26 10:11:29 +08:00
|
|
|
|
}
|
2024-07-30 00:39:58 +08:00
|
|
|
|
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
|
|
|
|
|
public static bool IWontTapOrSlideVigorously(ref bool __result)
|
|
|
|
|
{
|
|
|
|
|
__result = true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
|
|
|
|
|
public static bool GameOverMonitorPlayEnd(ref bool __result)
|
|
|
|
|
{
|
|
|
|
|
__result = true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HarmonyPrefix]
|
|
|
|
|
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
|
|
|
|
|
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
|
|
|
|
|
{
|
|
|
|
|
if (____state == GameOverProcess.GameOverSequence.SkyChange)
|
|
|
|
|
{
|
|
|
|
|
____state = GameOverProcess.GameOverSequence.Disp;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-21 21:17:30 +08:00
|
|
|
|
}
|
2024-07-30 00:39:58 +08:00
|
|
|
|
}
|