mirror of
https://github.com/hykilpikonna/AquaDX.git
synced 2026-08-09 12:41:56 -05:00
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using AquaMai.Config.Attributes;
|
|
using HarmonyLib;
|
|
using IO;
|
|
using Mecha;
|
|
using MelonLoader;
|
|
using Monitor;
|
|
using Process;
|
|
|
|
namespace AquaMai.Mods.UX;
|
|
|
|
[ConfigSection(
|
|
en: "Disable button LED when not playing",
|
|
zh: """
|
|
在游戏闲置时关闭外键和框体的灯光
|
|
“一闪一闪的 闪的我心发慌”
|
|
""")]
|
|
public static class DisableLightOutGame
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(Bd15070_4IF), nameof(Bd15070_4IF.SetColorFetAutoFade))]
|
|
public static bool SetColorFetAutoFadePrefix()
|
|
{
|
|
#if DEBUG
|
|
MelonLogger.Msg("[DisableLightOutGame] 拦截 Bd15070_4IF.SetColorFetAutoFade");
|
|
#endif
|
|
return false;
|
|
}
|
|
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(typeof(AdvDemoMonitor), "BeatUpdate")]
|
|
public static bool BeatUpdate()
|
|
{
|
|
#if DEBUG
|
|
MelonLogger.Msg("[DisableLightOutGame] 拦截 AdvDemoMonitor.BeatUpdate");
|
|
#endif
|
|
return false;
|
|
}
|
|
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(AdvDemoProcess), "OnStart")]
|
|
public static void AdvDemoProcessStart()
|
|
{
|
|
MechaManager.SetAllCuOff();
|
|
}
|
|
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch(typeof(AdvertiseProcess), "OnStart")]
|
|
public static void AdvertiseProcessStart()
|
|
{
|
|
MechaManager.SetAllCuOff();
|
|
}
|
|
} |