forked from akanyan/mu3-mods
fix: party play fixes
Also, stop using a finalizer
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using MonoMod;
|
||||
using MU3.Battle;
|
||||
using MU3.Data;
|
||||
using MU3.Game;
|
||||
@ -10,6 +11,10 @@ class patch_PlayMusic: PlayMusic {
|
||||
private SessionInfo _sessionInfo;
|
||||
private bool _nuclearSkip = false;
|
||||
public static bool ForceSkipped { get; private set; }
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern bool isPartyPlay();
|
||||
|
||||
private extern void orig_Execute_StartCutscene();
|
||||
private void Execute_StartCutscene() {
|
||||
orig_Execute_StartCutscene();
|
||||
@ -17,14 +22,20 @@ class patch_PlayMusic: PlayMusic {
|
||||
if(Singleton<Sys.System>.instance.config.isQuickStart || Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
ForceSkipped = true;
|
||||
_gameEngine.skipStartCutscene();
|
||||
setNextState(EState.Countdown);
|
||||
if(isPartyPlay()) {
|
||||
setNextState(EState.PartyWaitReady);
|
||||
} else {
|
||||
setNextState(EState.Countdown);
|
||||
}
|
||||
}
|
||||
}
|
||||
public extern bool orig_updateState(float deltaTime);
|
||||
public override bool updateState(float deltaTime = -1f) {
|
||||
var state = getCurrentState();
|
||||
if(state >= EState.PlayEnd && Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
|
||||
_nuclearSkip = true;
|
||||
if(!isPartyPlay() || state > EState.CalcResult) {
|
||||
_nuclearSkip = true;
|
||||
}
|
||||
}
|
||||
if(_nuclearSkip) {
|
||||
bool isTutorial = SingletonMonoBehaviour<GameEngine>.instance.sessionInfo.isTutorial;
|
||||
|
Reference in New Issue
Block a user