[RF] Move some settings to TimeSavingConfig

This commit is contained in:
Clansty
2024-09-27 19:13:53 +08:00
parent 24e6808984
commit 9605264b9a
11 changed files with 131 additions and 96 deletions

View 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);
}
}
}
}