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