mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 15:17:27 +08:00
[RF] Move some settings to TimeSavingConfig
This commit is contained in:
26
AquaMai/TimeSaving/ImproveLoadSpeed.cs
Normal file
26
AquaMai/TimeSaving/ImproveLoadSpeed.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Diagnostics;
|
||||
using HarmonyLib;
|
||||
using Process;
|
||||
|
||||
namespace AquaMai.TimeSaving
|
||||
{
|
||||
public class ImproveLoadSpeed
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(PowerOnProcess), "OnStart")]
|
||||
public static void PrePowerOnStart(ref float ____waitTime)
|
||||
{
|
||||
____waitTime = 0f;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(StartupProcess), "OnUpdate")]
|
||||
public static void PreStartupUpdate(byte ____state, ref Stopwatch ___timer)
|
||||
{
|
||||
if (____state == 8)
|
||||
{
|
||||
Traverse.Create(___timer).Field("elapsed").SetValue(2 * 10000000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user