forked from akanyan/mu3-mods
feat(SkipCutscenes): autocontinue
Also fix the "continue?" screen
This commit is contained in:
36
Extras/SkipCutscenes/MU3/patch_Scene_38_End.cs
Normal file
36
Extras/SkipCutscenes/MU3/patch_Scene_38_End.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using MonoMod;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_38_End: Scene_38_End {
|
||||
private Mode<Scene_38_End, State> mode_;
|
||||
private int result_;
|
||||
private UICommonWindow commonWindow_;
|
||||
private UIContinueDialog uiContinueDialog_;
|
||||
|
||||
[MonoModIgnore]
|
||||
private enum State {
|
||||
SendResultContinue = 2,
|
||||
End = 6
|
||||
}
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern void destroy(int result);
|
||||
|
||||
private void Init_Term() {
|
||||
using IniFile ini = new IniFile("mu3.ini");
|
||||
if(ini.getValue("Sequence", "AutoContinue", false) && mode_.get() != (int)State.End) {
|
||||
mode_.set(State.SendResultContinue);
|
||||
commonWindow_.transform.localScale = new UnityEngine.Vector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void EndContinue_Proc() {
|
||||
if(commonWindow_ != null && commonWindow_.IsEnd) {
|
||||
destroy(result_);
|
||||
} else if(uiContinueDialog_ != null && uiContinueDialog_.IsEnd) {
|
||||
destroy(result_);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user