mirror of https://github.com/hykilpikonna/AquaDX
Add ability to skip a bunch of stuff directly to music selection
parent
8152b9ab0d
commit
279fe5dcb8
|
@ -268,6 +268,7 @@
|
|||
<Compile Include="Main.cs" />
|
||||
<Compile Include="UX\SinglePlayer.cs" />
|
||||
<Compile Include="UX\SkipWarningScreen.cs" />
|
||||
<Compile Include="UX\SkipToMusicSelection.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace AquaMai
|
|||
{
|
||||
public bool SkipWarningScreen { get; set; }
|
||||
public bool SinglePlayer { get; set; }
|
||||
public bool SkipToMusicSelection { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,6 +44,12 @@ namespace AquaMai
|
|||
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SinglePlayer));
|
||||
}
|
||||
|
||||
if (AppConfig.UX.SkipToMusicSelection)
|
||||
{
|
||||
MelonLogger.Msg($"> Patching {nameof(SkipToMusicSelection)}");
|
||||
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SkipToMusicSelection));
|
||||
}
|
||||
|
||||
MelonLogger.Msg("Loaded!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue