forked from akanyan/mu3-mods
feat: instant song skip
This commit is contained in:
parent
edddcbffd7
commit
6b4022cbbe
@ -15,6 +15,7 @@ namespace MU3.Sequence;
|
||||
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;
|
||||
private GameEngine _gameEngine;
|
||||
private SessionInfo _sessionInfo;
|
||||
private bool _isRolling;
|
||||
@ -23,9 +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 extern void orig_Execute_Play();
|
||||
|
||||
public static double FadeOut(double progress, double min, double max) {
|
||||
@ -88,7 +87,13 @@ public class patch_PlayMusic : PlayMusic {
|
||||
if(Singleton<UIInput>.instance.getStateOn(UIInput.Key.MenuRight)) {
|
||||
StartRolling();
|
||||
} else {
|
||||
ntMgr.forceDamage(damage: 100);
|
||||
QuickSkip = true;
|
||||
setNextState(EState.End);
|
||||
destroy();
|
||||
ntMgr.stopPlay();
|
||||
_gameEngine.destroyAllies();
|
||||
_gameEngine.finishGame();
|
||||
_gameEngine.playFinish();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
35
BetterGiveUp/MU3/patch_Scene_37_Result.cs
Normal file
35
BetterGiveUp/MU3/patch_Scene_37_Result.cs
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma warning disable CS0626
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable IDE0051
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
using MU3.Sequence;
|
||||
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
|
||||
}
|
||||
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
mode_.set(State.End);
|
||||
}
|
||||
}
|
||||
}
|
36
BetterGiveUp/MU3/patch_Scene_38_End.cs
Normal file
36
BetterGiveUp/MU3/patch_Scene_38_End.cs
Normal file
@ -0,0 +1,36 @@
|
||||
#pragma warning disable CS0626
|
||||
#pragma warning disable CS0649
|
||||
#pragma warning disable CS0414
|
||||
#pragma warning disable IDE0051
|
||||
#pragma warning disable IDE1006
|
||||
|
||||
using MU3.Sequence;
|
||||
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
|
||||
}
|
||||
|
||||
private void Init_Init() {
|
||||
orig_Init_Init();
|
||||
|
||||
if(patch_PlayMusic.QuickSkip) {
|
||||
result_ = 0;
|
||||
mode_.set(State.End);
|
||||
patch_PlayMusic.QuickSkip = false;
|
||||
}
|
||||
}
|
||||
}
|
15
README.md
15
README.md
@ -1,16 +1,21 @@
|
||||
## µ3 mods
|
||||
|
||||
Miscellaneous mods for µ3/SDDT for my personal use.
|
||||
Miscellaneous mods for µ3/SDDT; mainly for my personal use, though suggestions/PRs are welcome.
|
||||
|
||||
### BetterGiveUp
|
||||
|
||||
Hold down the evil red menu button for 1 second to give up, or the friendlier yellow button to restart. Based on GiveUp, but Better (impossible to misclick).
|
||||
Enables these buttons in music play:
|
||||
|
||||
* Red menu: instant return to song select
|
||||
* Yellow menu: instant restart
|
||||
|
||||
To avoid misclicks, you have to hold the button down for 1 second. Based on GiveUp, but Better.
|
||||
|
||||
### ExportChartData
|
||||
|
||||
Export some useful chart data into a dollar-separated file (charts.csv) when the game launches.
|
||||
Exports some useful chart data into a dollar-separated file (charts.csv) when the game launches.
|
||||
|
||||
### NaiveRating
|
||||
|
||||
Replace the in-game rating algorithm (OldBest30+NewBest15+Recent10) with Best45.
|
||||
This change is client-side and immediate, but **the server will acknowledge it**. I host my own server and don't care, but you have been warned.
|
||||
Replaces the in-game rating algorithm (OldBest30+NewBest15+Recent10) with Best45.
|
||||
This change is client-side and immediate, but the server **will** acknowledge it. I host my own server and don't care, but you have been warned.
|
Loading…
Reference in New Issue
Block a user