forked from akanyan/mu3-mods
feat: implement TestMenuConfig
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
using MonoMod;
|
||||
using MU3.Battle;
|
||||
using MU3.Data;
|
||||
using MU3.Game;
|
||||
using MU3.Util;
|
||||
|
||||
@ -10,15 +9,24 @@ class patch_PlayMusic: PlayMusic {
|
||||
private GameEngine _gameEngine;
|
||||
private SessionInfo _sessionInfo;
|
||||
private bool _nuclearSkip = false;
|
||||
private bool _quickStart = false;
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern bool isPartyPlay();
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern void Enter_ShowBonusStart();
|
||||
|
||||
private void Leave_LoadScene() {
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_quickStart = iniFile.getValue("Sequence", "QuickStart", false);
|
||||
}
|
||||
|
||||
private extern void orig_Execute_StartCutscene();
|
||||
private void Execute_StartCutscene() {
|
||||
orig_Execute_StartCutscene();
|
||||
Singleton<Mod.State>.instance.SkipEntry = false;
|
||||
if(Singleton<Sys.System>.instance.config.isQuickStart || Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
if(_quickStart || Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
Singleton<Mod.State>.instance.SkipEntry = true;
|
||||
_gameEngine.skipStartCutscene();
|
||||
if(isPartyPlay()) {
|
||||
@ -45,8 +53,8 @@ class patch_PlayMusic: PlayMusic {
|
||||
setNextState(EState.CalcResult);
|
||||
}
|
||||
if(state > EState.CalcResult) {
|
||||
int selectorID = SingletonStateMachine<DataManager, DataManager.EState>.instance.getMemoryChapterData(_sessionInfo.chapterSelection.memoryChapterId)?.getMemoryChapterSelectorID() ?? 4;
|
||||
Singleton<GameSound>.instance.gameBGM.playBGM(236, selectorID);
|
||||
Enter_ShowBonusStart();
|
||||
SingletonMonoBehaviour<SystemUI>.instance.destroySkipButton(true);
|
||||
setNextState(EState.End);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user