feat: add infinite gp and skip premusic

Also, run the autoformatter.
Also, the skip is now cleaner.
This commit is contained in:
あかニャン 2024-05-26 08:15:13 +09:00
parent 63453d5e5f
commit a4104a67e7
16 changed files with 205 additions and 84 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
**/bin/*
**/obj/*
*.dll
Common/

View File

@ -0,0 +1,22 @@
#pragma warning disable CS0626
#pragma warning disable CS0649
#pragma warning disable IDE0051
#pragma warning disable IDE1006
#pragma warning disable CS0108
#pragma warning disable CS0414
using MU3.Sequence;
namespace MU3;
public class patch_Scene_32_PrePlayMusic_MusicSelect: Scene_32_PrePlayMusic_MusicSelect {
private bool _playVoice;
private extern void orig_Enter_Select();
private void Enter_Select() {
if(patch_PlayMusic.QuickSkip) {
patch_PlayMusic.QuickSkip = false;
_playVoice = false;
}
orig_Enter_Select();
}
}

View File

@ -13,6 +13,7 @@ public class patch_Scene_38_End : Scene_38_End {
private Mode<Scene_38_End, State> mode_;
private extern void orig_Init_Init();
private int result_;
private UICommonWindow commonWindow_;
private enum State {
Init,
Continue,
@ -30,7 +31,15 @@ public class patch_Scene_38_End : Scene_38_End {
if(patch_PlayMusic.QuickSkip) {
result_ = 0;
mode_.set(State.End);
patch_PlayMusic.QuickSkip = false;
}
}
private void End_Init() {
SystemUI instance = SingletonMonoBehaviour<SystemUI>.instance;
instance.Panel.popState();
if(!patch_PlayMusic.QuickSkip) {
instance.fadeOut();
}
commonWindow_.end();
}
}

View File

@ -0,0 +1,33 @@
#pragma warning disable CS0626
#pragma warning disable CS0649
#pragma warning disable IDE0051
#pragma warning disable IDE1006
#pragma warning disable CS0108
namespace MU3.User;
public class patch_UserManager: UserManager {
public const int DefaultGP = 666;
private int _gp;
private OnUpdate _onUpdateGP;
private OnReset _onResetGP;
public void resetGP() {
_gp = 666;
if(_onResetGP != null) {
_onResetGP(_gp);
}
}
public int GP {
get {
return _gp;
}
private set {
_gp = 666;
if(_onUpdateGP != null) {
_onUpdateGP(_gp);
}
}
}
}

View File

@ -0,0 +1,8 @@

using MU3.Battle;
public class patch_BattleCamera: BattleCamera {
private void Enter_StartCutscene() {
setNextState(EState.ToPlay);
}
}

View File

@ -0,0 +1,22 @@
using MU3.Util;
using System;
using UnityEngine;
namespace MU3;
public class patch_BattleUI: BattleUI {
private System.Collections.IEnumerator playReadyProc(Action onFinish) {
if(!SystemUI.Exists) {
onFinish();
yield break;
}
SystemUI systemUI = SingletonMonoBehaviour<SystemUI>.instance;
float time = 1.5f;
while(0f < time) {
yield return null;
time -= Time.deltaTime;
}
onFinish();
systemUI.removeCanvas(MU3.Graphics.Const.SortOrder.UI);
}
}

View File

@ -0,0 +1,9 @@
#pragma warning disable CS0108
namespace MU3.Battle;
public class patch_GameEngine: GameEngine {
public bool isStartCutsceneFinish() {
return true;
}
}

View File

@ -0,0 +1,19 @@
#pragma warning disable CS0626
#pragma warning disable CS0649
#pragma warning disable IDE0051
#pragma warning disable IDE1006
using MU3.Battle;
namespace MU3.Sequence;
public class patch_PlayMusic: PlayMusic {
private GameEngine _gameEngine;
private extern void orig_Execute_StartCutscene();
private void Execute_StartCutscene() {
orig_Execute_StartCutscene();
_gameEngine.skipStartCutscene();
setNextState(EState.Countdown);
}
}

View File

@ -3,15 +3,13 @@
#pragma warning disable IDE0051
#pragma warning disable IDE1006
using MU3.Sequence;
using MU3.Util;
namespace MU3;
public class patch_Scene_30_NoticeReward: Scene_30_NoticeReward {
private Mode<Scene_30_NoticeReward, State> _mode;
private enum State
{
private enum State {
Attention,
Notice,
RankingReward,