mirror of https://github.com/hykilpikonna/AquaDX
[F] Skip Event Info
parent
bf9197b3e4
commit
2ef8219f15
|
@ -26,6 +26,7 @@ namespace AquaMai
|
||||||
public bool RandomBgm { get; set; }
|
public bool RandomBgm { get; set; }
|
||||||
public bool DemoMaster { get; set; }
|
public bool DemoMaster { get; set; }
|
||||||
public bool ExtendTimer { get; set; }
|
public bool ExtendTimer { get; set; }
|
||||||
|
public bool SkipEventInfo { get; set; }
|
||||||
public string CustomVersionString { get; set; }
|
public string CustomVersionString { get; set; }
|
||||||
public string ExecOnIdle { get; set; }
|
public string ExecOnIdle { get; set; }
|
||||||
public string ExecOnEntry { get; set; }
|
public string ExecOnEntry { get; set; }
|
||||||
|
|
|
@ -1,38 +1,15 @@
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using MelonLoader;
|
using Process.Information;
|
||||||
using Monitor.Information;
|
|
||||||
using UnityEngine.Assertions;
|
|
||||||
|
|
||||||
namespace AquaMai.UX
|
namespace AquaMai.UX
|
||||||
{
|
{
|
||||||
public class SkipEventInfo
|
public class SkipEventInfo
|
||||||
{
|
{
|
||||||
// public override void Initialize(int monIndex, bool active)
|
|
||||||
// Postfix: Set this.state to DispState.End
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(InformationMonitor), "Initialize", new []{typeof(int), typeof(bool)})]
|
[HarmonyPatch(typeof(InformationProcess), "OnStart")]
|
||||||
public static void Initialize(InformationMonitor __instance, int monIndex, bool active)
|
public static void InformationProcessPreStart(ref uint ____state)
|
||||||
{
|
{
|
||||||
// State is private, cannot access directly
|
____state = 3;
|
||||||
// __instance.state = InformationMonitor.DispState.End;
|
|
||||||
|
|
||||||
// Use reflection to set the state
|
|
||||||
// var stateField = typeof(InformationMonitor).GetField("state", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
|
||||||
// if (stateField == null)
|
|
||||||
// {
|
|
||||||
// MelonLogger.Msg("Failed to get state field");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// stateField.SetValue(__instance, InformationMonitor.DispState.End);
|
|
||||||
|
|
||||||
// Use reflection to set _dispTime to 0
|
|
||||||
var dispTimeField = typeof(InformationMonitor).GetField("_dispTime", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
|
||||||
if (dispTimeField == null)
|
|
||||||
{
|
|
||||||
MelonLogger.Msg("Failed to get _dispTime field");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
dispTimeField.SetValue(__instance, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using MAI2.Util;
|
using MAI2.Util;
|
||||||
using Manager;
|
using Manager;
|
||||||
using Manager.UserDatas;
|
|
||||||
using MelonLoader;
|
|
||||||
using Monitor;
|
using Monitor;
|
||||||
using Process;
|
using Process;
|
||||||
using Process.Information;
|
using Process.Information;
|
||||||
|
|
Loading…
Reference in New Issue