forked from Cookies_Public/AquaDX
[PR] #7 from tc21: skip-to-music
Add ability to skip a bunch of stuff directly to music selection
This commit is contained in:
commit
fb58f08e44
@ -270,6 +270,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" />
|
||||
|
||||
@ -17,6 +17,7 @@ namespace AquaMai
|
||||
{
|
||||
public bool SkipWarningScreen { get; set; }
|
||||
public bool SinglePlayer { get; set; }
|
||||
public bool SkipToMusicSelection { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -50,6 +50,11 @@ namespace AquaMai
|
||||
if (AppConfig.Cheat.TicketUnlock)
|
||||
Patch(typeof(TicketUnlock));
|
||||
|
||||
if (AppConfig.UX.SkipToMusicSelection)
|
||||
{
|
||||
Patch(typeof(SkipToMusicSelection));
|
||||
}
|
||||
|
||||
// Fixes that does not have side effects
|
||||
// These don't need to be configurable
|
||||
Patch(typeof(FixCharaCrash));
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user