[+] Play "Master" difficulty on Demo screen

pull/40/head
Clansty 2024-05-20 23:36:52 +08:00
parent 13fc51a8a5
commit c9f222583a
4 changed files with 31 additions and 0 deletions

View File

@ -273,6 +273,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs" />
<Compile Include="UX\CustomVersionString.cs" />
<Compile Include="UX\DemoMaster.cs" />
<Compile Include="UX\DisableReboot.cs" />
<Compile Include="UX\LoadJacketPng.cs" />
<Compile Include="UX\LoadAssetBundleWithoutManifest.cs" />

View File

@ -26,6 +26,8 @@ LoadAssetBundleWithoutManifest=true
SkipEventInfo=true
# Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them
RandomBgm=false
# Play "Master" difficulty on Demo screen
DemoMaster=true
# Execute some command on game idle or on game start
ExecOnIdle=""
ExecOnEntry=""

View File

@ -23,6 +23,7 @@ namespace AquaMai
public bool LoadAssetBundleWithoutManifest { get; set; }
public bool QuickSkip { get; set; }
public bool RandomBgm { get; set; }
public bool DemoMaster { get; set; }
public string CustomVersionString { get; set; }
public string ExecOnIdle { get; set; }
public string ExecOnEntry { get; set; }

View File

@ -0,0 +1,27 @@
using DB;
using HarmonyLib;
using MAI2.Util;
using Manager;
using Process;
namespace AquaMai.UX
{
public class DemoMaster
{
[HarmonyPostfix]
[HarmonyPatch(typeof(AdvDemoProcess), "OnStart")]
public static void AdvDemoProcessPostStart()
{
var userOption = Singleton<GamePlayManager>.Instance.GetGameScore(0).UserOption;
userOption.NoteSpeed = OptionNotespeedID.Speed7_0;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GamePlayManager), "InitializeAdvertise")]
public static void PreInitializeAdvertise()
{
GameManager.SelectDifficultyID[0] = 3;
GameManager.SelectDifficultyID[1] = 3;
}
}
}