mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 18:17:27 +08:00
Add ability to skip a bunch of stuff directly to music selection
This commit is contained in:
@@ -2,10 +2,12 @@ using System;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AquaMai {
|
||||
namespace AquaMai.UX
|
||||
{
|
||||
// Hides the 2p (right hand side) UI.
|
||||
// Note: this is not my original work. I simply interpreted the code and rewrote it as a mod.
|
||||
public class SinglePlayer {
|
||||
public class SinglePlayer
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
|
||||
public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
|
||||
|
||||
26
AquaMai/UX/SkipToMusicSelection.cs
Normal file
26
AquaMai/UX/SkipToMusicSelection.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using HarmonyLib;
|
||||
using Manager;
|
||||
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), 50);
|
||||
___container.processManager.ReleaseProcess(__instance);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user