[F] SinglePlayer compatibility with 1.09.00

pull/78/head
Clansty 2024-10-28 00:04:43 +08:00
parent 36da872932
commit de3d376063
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 23 additions and 18 deletions

View File

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using AquaMai.Attributes;
using HarmonyLib; using HarmonyLib;
using MAI2.Util; using MAI2.Util;
using Manager; using Manager;
@ -42,26 +43,30 @@ namespace AquaMai.UX
return false; return false;
} }
[HarmonyPostfix] [GameVersion(21500)]
[HarmonyPatch(typeof(EntryMonitor), "DecideEntry")] public class SkipTimer
public static void PostDecideEntry(EntryMonitor __instance)
{ {
MelonLogger.Msg("Confirm Entry"); [HarmonyPostfix]
TimeManager.MarkGameStartTime(); [HarmonyPatch(typeof(EntryMonitor), "DecideEntry")]
Singleton<EventManager>.Instance.UpdateEvent(); public static void PostDecideEntry(EntryMonitor __instance)
Singleton<ScoreRankingManager>.Instance.UpdateData(); {
__instance.Process.CreateDownloadProcess(); MelonLogger.Msg("Confirm Entry");
__instance.ProcessManager.SendMessage(new Message(ProcessType.CommonProcess, 30001)); TimeManager.MarkGameStartTime();
__instance.ProcessManager.SendMessage(new Message(ProcessType.CommonProcess, 40000, 0, OperationInformationController.InformationType.Hide)); Singleton<EventManager>.Instance.UpdateEvent();
__instance.Process.SetNextProcess(); Singleton<ScoreRankingManager>.Instance.UpdateData();
} __instance.Process.CreateDownloadProcess();
__instance.ProcessManager.SendMessage(new Message(ProcessType.CommonProcess, 30001));
__instance.ProcessManager.SendMessage(new Message(ProcessType.CommonProcess, 40000, 0, OperationInformationController.InformationType.Hide));
__instance.Process.SetNextProcess();
}
// To prevent the "長押受付終了" overlay from appearing // To prevent the "長押受付終了" overlay from appearing
[HarmonyPrefix] [HarmonyPrefix]
[HarmonyPatch(typeof(WaitPartner), "Open")] [HarmonyPatch(typeof(WaitPartner), "Open")]
public static bool WaitPartnerPreOpen() public static bool WaitPartnerPreOpen()
{ {
return false; return false;
}
} }
} }
} }