mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[+] AquaMai: Skip event and info screen for new users
This commit is contained in:
parent
7992568c0f
commit
fb72317c6f
@ -275,6 +275,7 @@
|
|||||||
<Compile Include="UX\LoadAssetBundleWithoutManifest.cs" />
|
<Compile Include="UX\LoadAssetBundleWithoutManifest.cs" />
|
||||||
<Compile Include="UX\QuickSkip.cs" />
|
<Compile Include="UX\QuickSkip.cs" />
|
||||||
<Compile Include="UX\SinglePlayer.cs" />
|
<Compile Include="UX\SinglePlayer.cs" />
|
||||||
|
<Compile Include="UX\SkipEventInfo.cs" />
|
||||||
<Compile Include="UX\SkipWarningScreen.cs" />
|
<Compile Include="UX\SkipWarningScreen.cs" />
|
||||||
<Compile Include="UX\SkipToMusicSelection.cs" />
|
<Compile Include="UX\SkipToMusicSelection.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -22,6 +22,8 @@ LoadJacketPng=true
|
|||||||
QuickSkip=true
|
QuickSkip=true
|
||||||
# Add ".ab" image resources without the need of rebuilding a manifest
|
# Add ".ab" image resources without the need of rebuilding a manifest
|
||||||
LoadAssetBundleWithoutManifest=true
|
LoadAssetBundleWithoutManifest=true
|
||||||
|
# Skip "New Event" and "Information" text boxes for new users
|
||||||
|
SkipEventInfo=true
|
||||||
|
|
||||||
[Performance]
|
[Performance]
|
||||||
# Disable some useless delays to speed up the game boot process
|
# Disable some useless delays to speed up the game boot process
|
||||||
|
|||||||
@ -16,6 +16,7 @@ This mod is heavily WIP. More details will be added as the development progresse
|
|||||||
* Disable daily automatic reboot
|
* Disable daily automatic reboot
|
||||||
* Customize version text
|
* Customize version text
|
||||||
* Skip the current song by holding 7
|
* Skip the current song by holding 7
|
||||||
|
* Skip "new event" and "information" screen for new players.
|
||||||
|
|
||||||
**Bug Fixes**
|
**Bug Fixes**
|
||||||
|
|
||||||
|
|||||||
38
AquaMai/UX/SkipEventInfo.cs
Normal file
38
AquaMai/UX/SkipEventInfo.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
|
using Monitor.Information;
|
||||||
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
|
namespace AquaMai.UX
|
||||||
|
{
|
||||||
|
public class SkipEventInfo
|
||||||
|
{
|
||||||
|
// public override void Initialize(int monIndex, bool active)
|
||||||
|
// Postfix: Set this.state to DispState.End
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(InformationMonitor), "Initialize", new []{typeof(int), typeof(bool)})]
|
||||||
|
public static void Initialize(InformationMonitor __instance, int monIndex, bool active)
|
||||||
|
{
|
||||||
|
// State is private, cannot access directly
|
||||||
|
// __instance.state = InformationMonitor.DispState.End;
|
||||||
|
|
||||||
|
// Use reflection to set the state
|
||||||
|
// var stateField = typeof(InformationMonitor).GetField("state", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
||||||
|
// if (stateField == null)
|
||||||
|
// {
|
||||||
|
// MelonLogger.Msg("Failed to get state field");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// stateField.SetValue(__instance, InformationMonitor.DispState.End);
|
||||||
|
|
||||||
|
// Use reflection to set _dispTime to 0
|
||||||
|
var dispTimeField = typeof(InformationMonitor).GetField("_dispTime", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
||||||
|
if (dispTimeField == null)
|
||||||
|
{
|
||||||
|
MelonLogger.Msg("Failed to get _dispTime field");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dispTimeField.SetValue(__instance, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user