[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

@@ -52,31 +52,5 @@ namespace AquaMai.UX
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
public static bool IWontTapOrSlideVigorously(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
public static bool GameOverMonitorPlayEnd(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
{
if (____state == GameOverProcess.GameOverSequence.SkyChange)
{
____state = GameOverProcess.GameOverSequence.Disp;
}
}
}
}

View File

@@ -1,24 +0,0 @@
using System.Collections.Generic;
using HarmonyLib;
using Process;
using Process.Information;
namespace AquaMai.UX
{
public class SkipEventInfo
{
[HarmonyPostfix]
[HarmonyPatch(typeof(InformationProcess), "OnStart")]
public static void InformationProcessPostStart(ref uint ____state)
{
____state = 3;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(RegionalSelectProcess), "OnStart")]
public static void RegionalSelectProcessPreStart(ref Queue<int>[] ____discoverList)
{
____discoverList = new Queue<int>[] { new Queue<int>(), new Queue<int>() };
}
}
}

View File

@@ -1,38 +0,0 @@
using HarmonyLib;
using MAI2.Util;
using Manager;
using Monitor;
using Process;
using Process.Information;
namespace AquaMai.UX
{
public class SkipToMusicSelection
{
/*
* Highly experimental, may well break some stuff
* Works by overriding the info screen (where it shows new events and stuff)
* to directly exit to the music selection screen, skipping character and
* event selection, among others
*/
[HarmonyPrefix]
[HarmonyPatch(typeof(InformationProcess), "OnUpdate")]
public static bool OnUpdate(InformationProcess __instance, ProcessDataContainer ___container)
{
GameManager.SetMaxTrack();
___container.processManager.AddProcess(new MusicSelectProcess(___container));
___container.processManager.ReleaseProcess(__instance);
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(MapResultMonitor), "Initialize")]
public static void MapResultMonitorPreInitialize(int monIndex)
{
var userData = Singleton<UserDataManager>.Instance.GetUserData(monIndex);
var index = userData.MapList.FindIndex((UserMapData m) => m.ID == userData.Detail.SelectMapID);
if (index >= 0) return;
userData.MapList.Clear();
}
}
}

View File

@@ -1,28 +0,0 @@
using HarmonyLib;
using Monitor;
namespace AquaMai.UX
{
public class SkipWarningScreen
{
/*
* 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;
}
}
}