feat: add infinite gp and skip premusic
Also, run the autoformatter. Also, the skip is now cleaner.
This commit is contained in:
parent
63453d5e5f
commit
a4104a67e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
**/bin/*
|
||||
**/obj/*
|
||||
*.dll
|
||||
Common/
|
@ -7,7 +7,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace MU3.Game;
|
||||
|
||||
public class patch_GameLED : GameLED {
|
||||
public class patch_GameLED: GameLED {
|
||||
private patch_ButtonList _buttonList = new();
|
||||
|
||||
public extern void orig_initialize();
|
||||
@ -17,7 +17,7 @@ public class patch_GameLED : GameLED {
|
||||
orig_initialize();
|
||||
}
|
||||
|
||||
private class patch_ButtonParam {}
|
||||
private class patch_ButtonParam { }
|
||||
|
||||
private class patch_ButtonList : List<patch_ButtonParam> {}
|
||||
private class patch_ButtonList: List<patch_ButtonParam> { }
|
||||
}
|
@ -6,9 +6,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.Notes;
|
||||
public class patch_FieldObject : FieldObject {
|
||||
public class patch_FieldObject: FieldObject {
|
||||
public class patch_BarNotes {
|
||||
public class patch_Bar : BarNotes.Bar {
|
||||
public class patch_Bar: BarNotes.Bar {
|
||||
public extern void orig_update(NotesManager mgr, float width = 1f);
|
||||
|
||||
public new void update(NotesManager mgr, float width = 1f) {
|
||||
|
@ -7,7 +7,7 @@ using UnityEngine;
|
||||
|
||||
namespace MU3.Notes;
|
||||
|
||||
public class patch_NotesManager : NotesManager {
|
||||
public class patch_NotesManager: NotesManager {
|
||||
public extern void orig_reset();
|
||||
|
||||
public extern Vector3 orig_getEnemyPos();
|
||||
|
@ -12,7 +12,7 @@ using UnityEngine;
|
||||
|
||||
namespace MU3.Sequence;
|
||||
|
||||
public class patch_PlayMusic : PlayMusic {
|
||||
public class patch_PlayMusic: PlayMusic {
|
||||
private static readonly TimeSpan HOLD_DURATION = TimeSpan.FromSeconds(1.0f);
|
||||
private static readonly TimeSpan ROLL_DURATION = TimeSpan.FromSeconds(0.5f);
|
||||
public static bool QuickSkip = false;
|
||||
@ -24,7 +24,7 @@ public class patch_PlayMusic : PlayMusic {
|
||||
private bool _isHoldingAck;
|
||||
private DateTime _holdingStartTime;
|
||||
private float enemyPosX;
|
||||
private patch_NotesManager ntMgr => (patch_NotesManager) _gameEngine?.notesManager;
|
||||
private patch_NotesManager ntMgr => (patch_NotesManager)_gameEngine?.notesManager;
|
||||
private extern void orig_Execute_Play();
|
||||
|
||||
public static double FadeOut(double progress, double min, double max) {
|
||||
@ -66,12 +66,12 @@ public class patch_PlayMusic : PlayMusic {
|
||||
private void Execute_Play() {
|
||||
if(_isRolling) {
|
||||
TimeSpan timeSpan = CustomDateTime.Now - _rollingStartTime;
|
||||
if (timeSpan <= ROLL_DURATION) {
|
||||
if(timeSpan <= ROLL_DURATION) {
|
||||
double num1 = FadeOut(timeSpan.TotalMilliseconds / ROLL_DURATION.TotalMilliseconds, 0.0, 1.0);
|
||||
double num2 = FadeIn(timeSpan.TotalMilliseconds / ROLL_DURATION.TotalMilliseconds, 0.0, 1.0);
|
||||
ntMgr.setFrameForce(_totalRollingFrame * (float)(1.0 - num1));
|
||||
ntMgr.enemyOffset = new Vector3(
|
||||
ntMgr.enemyOffset.x + (enemyPosX - ntMgr.getEnemyPos().x), 20f * (float) num2, 0.0f
|
||||
ntMgr.enemyOffset.x + (enemyPosX - ntMgr.getEnemyPos().x), 20f * (float)num2, 0.0f
|
||||
);
|
||||
} else {
|
||||
EndRolling();
|
||||
|
22
BetterGiveUp/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal file
22
BetterGiveUp/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal 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();
|
||||
}
|
||||
}
|
@ -8,28 +8,28 @@ using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
public class patch_Scene_37_Result : Scene_37_Result {
|
||||
private Mode<Scene_37_Result, State> mode_;
|
||||
private extern void orig_Init_Init();
|
||||
private enum State {
|
||||
Init,
|
||||
Score,
|
||||
Assignment,
|
||||
ReleaseMaster,
|
||||
GetMusic,
|
||||
UnlockScenario,
|
||||
Event,
|
||||
MemoryChapterEvent,
|
||||
CardCharaUp,
|
||||
CardCharaWaitSkip,
|
||||
CardCharaEnd,
|
||||
End
|
||||
}
|
||||
public class patch_Scene_37_Result: Scene_37_Result {
|
||||
private Mode<Scene_37_Result, State> mode_;
|
||||
private extern void orig_Init_Init();
|
||||
private enum State {
|
||||
Init,
|
||||
Score,
|
||||
Assignment,
|
||||
ReleaseMaster,
|
||||
GetMusic,
|
||||
UnlockScenario,
|
||||
Event,
|
||||
MemoryChapterEvent,
|
||||
CardCharaUp,
|
||||
CardCharaWaitSkip,
|
||||
CardCharaEnd,
|
||||
End
|
||||
}
|
||||
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
mode_.set(State.End);
|
||||
}
|
||||
}
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
mode_.set(State.End);
|
||||
}
|
||||
}
|
||||
}
|
@ -9,28 +9,37 @@ using MU3.Util;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
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 enum State {
|
||||
Init,
|
||||
Continue,
|
||||
SendResultContinue,
|
||||
EndContinue,
|
||||
ForceLogout,
|
||||
ConsumeGP,
|
||||
End,
|
||||
WaitDestroy
|
||||
}
|
||||
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,
|
||||
SendResultContinue,
|
||||
EndContinue,
|
||||
ForceLogout,
|
||||
ConsumeGP,
|
||||
End,
|
||||
WaitDestroy
|
||||
}
|
||||
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
result_ = 0;
|
||||
mode_.set(State.End);
|
||||
patch_PlayMusic.QuickSkip = false;
|
||||
}
|
||||
}
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
result_ = 0;
|
||||
mode_.set(State.End);
|
||||
}
|
||||
}
|
||||
|
||||
private void End_Init() {
|
||||
SystemUI instance = SingletonMonoBehaviour<SystemUI>.instance;
|
||||
instance.Panel.popState();
|
||||
if(!patch_PlayMusic.QuickSkip) {
|
||||
instance.fadeOut();
|
||||
}
|
||||
commonWindow_.end();
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ using System.IO;
|
||||
|
||||
namespace MU3.Data;
|
||||
|
||||
public class patch_DataManager : DataManager {
|
||||
public class patch_DataManager: DataManager {
|
||||
private extern void orig_linkFumenAnalysisData();
|
||||
private const string SEPARATOR = "$";
|
||||
private string PrintHeader() {
|
||||
|
33
InfiniteGP/MU3.User/patch_UserManager.cs
Normal file
33
InfiniteGP/MU3.User/patch_UserManager.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -22,19 +22,19 @@ public class patch_UserRating: UserRating {
|
||||
|
||||
var musicDict = usMgr.userMusic;
|
||||
|
||||
foreach (KeyValuePair<int, UserMusic> item in musicDict) {
|
||||
foreach(KeyValuePair<int, UserMusic> item in musicDict) {
|
||||
MU3.Data.MusicData musicData = SingletonStateMachine<DataManager, DataManager.EState>.instance.getMusicData(item.Key);
|
||||
if (musicData == null || item.Key == 1 || musicData.isBonusTrack) {
|
||||
if(musicData == null || item.Key == 1 || musicData.isBonusTrack) {
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
FumenDifficulty fumenDifficulty = (FumenDifficulty)i;
|
||||
UserFumen userFumen = usMgr.getUserFumen(item.Key, fumenDifficulty, create: false);
|
||||
if (userFumen == null) {
|
||||
if(userFumen == null) {
|
||||
continue;
|
||||
}
|
||||
Rating rating = new Rating(musicData.id, fumenDifficulty, userFumen.TechScoreMax);
|
||||
if (rating.level100 == 0) {
|
||||
if(rating.level100 == 0) {
|
||||
continue;
|
||||
}
|
||||
ratingList.Add(rating);
|
||||
@ -48,7 +48,7 @@ public class patch_UserRating: UserRating {
|
||||
|
||||
private void calcRate() {
|
||||
_rating100 = 0;
|
||||
foreach (Rating best in calcSane().Take(45)) {
|
||||
foreach(Rating best in calcSane().Take(45)) {
|
||||
_rating100 += best.rate100;
|
||||
}
|
||||
_rating100 /= 45;
|
||||
|
8
SkipBullshit/MU3.Battle/patch_BattleCamera.cs
Normal file
8
SkipBullshit/MU3.Battle/patch_BattleCamera.cs
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
using MU3.Battle;
|
||||
|
||||
public class patch_BattleCamera: BattleCamera {
|
||||
private void Enter_StartCutscene() {
|
||||
setNextState(EState.ToPlay);
|
||||
}
|
||||
}
|
22
SkipBullshit/MU3.Battle/patch_BattleUI.cs
Normal file
22
SkipBullshit/MU3.Battle/patch_BattleUI.cs
Normal 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);
|
||||
}
|
||||
}
|
9
SkipBullshit/MU3.Battle/patch_GameEngine.cs
Normal file
9
SkipBullshit/MU3.Battle/patch_GameEngine.cs
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma warning disable CS0108
|
||||
|
||||
namespace MU3.Battle;
|
||||
|
||||
public class patch_GameEngine: GameEngine {
|
||||
public bool isStartCutsceneFinish() {
|
||||
return true;
|
||||
}
|
||||
}
|
19
SkipBullshit/MU3.Sequence/patch_PlayMusic.cs
Normal file
19
SkipBullshit/MU3.Sequence/patch_PlayMusic.cs
Normal 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);
|
||||
}
|
||||
}
|
@ -3,30 +3,28 @@
|
||||
#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
|
||||
{
|
||||
Attention,
|
||||
Notice,
|
||||
RankingReward,
|
||||
TechnicalChallengeReward,
|
||||
DailyBonus,
|
||||
AimeCollab,
|
||||
Present,
|
||||
TrainingRoom,
|
||||
FadeOut,
|
||||
End
|
||||
}
|
||||
public class patch_Scene_30_NoticeReward: Scene_30_NoticeReward {
|
||||
private Mode<Scene_30_NoticeReward, State> _mode;
|
||||
private enum State {
|
||||
Attention,
|
||||
Notice,
|
||||
RankingReward,
|
||||
TechnicalChallengeReward,
|
||||
DailyBonus,
|
||||
AimeCollab,
|
||||
Present,
|
||||
TrainingRoom,
|
||||
FadeOut,
|
||||
End
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
_mode = new Mode<Scene_30_NoticeReward, State>(this);
|
||||
_mode.set(State.FadeOut);
|
||||
SingletonMonoBehaviour<SystemUI>.instance.Panel.pushState(0, show: true);
|
||||
}
|
||||
private void Start() {
|
||||
_mode = new Mode<Scene_30_NoticeReward, State>(this);
|
||||
_mode.set(State.FadeOut);
|
||||
SingletonMonoBehaviour<SystemUI>.instance.Panel.pushState(0, show: true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user