AquaDX/AquaMai/UX/SkipWarningScreen.cs

28 lines
749 B
C#
Raw Normal View History

2024-02-07 13:45:47 +08:00
using HarmonyLib;
using Monitor;
2024-02-07 15:38:36 +08:00
namespace AquaMai.UX
2024-02-07 13:45:47 +08:00
{
2024-02-07 15:38:36 +08:00
public class SkipWarningScreen
2024-02-07 13:45:47 +08:00
{
/*
* Patch PlayLogo to disable the warning screen
*/
[HarmonyPrefix]
[HarmonyPatch(typeof (WarningMonitor), "PlayLogo")]
public static bool PlayLogo()
{
// Return false to block the original method
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof (WarningMonitor), "IsLogoAnimationEnd")]
public static bool IsLogoAnimationEnd(ref bool __result)
{
// Always return true to indicate the animation has ended
__result = true;
return false;
}
}
}