forked from akanyan/mu3-mods
fix(SkipCutscenes): interaction with restart
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using MonoMod;
|
||||
using MU3.Battle;
|
||||
using MU3.Notes;
|
||||
using MU3.Util;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
@ -10,6 +11,9 @@ class patch_PlayMusic: PlayMusic {
|
||||
private GameEngine _gameEngine;
|
||||
private bool _quickStart = false;
|
||||
|
||||
[MonoModIgnore]
|
||||
private NotesManager ntMgr => null;
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern bool isPartyPlay();
|
||||
|
||||
@ -42,8 +46,13 @@ class patch_PlayMusic: PlayMusic {
|
||||
|
||||
private IEnumerator nuclearSkip() {
|
||||
bool enabled = false;
|
||||
var initialFrame = ntMgr.getCurrentFrame();
|
||||
EState state;
|
||||
while((state = getCurrentState()) < EState.End) {
|
||||
if(initialFrame > ntMgr.getCurrentFrame()) {
|
||||
// The run must have been restarted
|
||||
yield break;
|
||||
}
|
||||
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
if(!isPartyPlay() || state > EState.CalcResult) {
|
||||
enabled = true;
|
||||
|
Reference in New Issue
Block a user