forked from akanyan/mu3-mods
fix(SelectBGM): scoreboard bgm
This commit is contained in:
@ -7,8 +7,6 @@ namespace MU3.Sequence;
|
||||
|
||||
class patch_Play: Play {
|
||||
private LocalSessionInfo _localSessionInfo;
|
||||
|
||||
public static int RecentID = 6;
|
||||
private extern void orig_Enter_Login();
|
||||
private void Enter_Login() {
|
||||
orig_Enter_Login();
|
||||
@ -21,19 +19,20 @@ class patch_Play: Play {
|
||||
if(index < 0 || index > 6) {
|
||||
index = 6;
|
||||
}
|
||||
RecentID = index;
|
||||
Singleton<Mod.State>.instance.RecentBGM = index;
|
||||
Singleton<GameSound>.instance.gameBGM.playBGM(233, index);
|
||||
}
|
||||
|
||||
private extern void orig_Enter_ChapterSelect();
|
||||
private void Enter_ChapterSelect() {
|
||||
patch_GameBGM.WithholdPlay = true;
|
||||
var state = Singleton<Mod.State>.instance;
|
||||
state.WithholdPlay = true;
|
||||
orig_Enter_ChapterSelect();
|
||||
patch_GameBGM.WithholdPlay = false;
|
||||
state.WithholdPlay = false;
|
||||
|
||||
int selectorID = SingletonStateMachine<DataManager, DataManager.EState>.instance.getMemoryChapterData(
|
||||
_localSessionInfo.chapterSelection.memoryChapterId
|
||||
)?.getMemoryChapterSelectorID() ?? RecentID;
|
||||
)?.getMemoryChapterSelectorID() ?? state.RecentBGM;
|
||||
Singleton<GameSound>.instance.gameBGM.playBGM(233, selectorID);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user