1
0
forked from akanyan/mu3-mods

fix(SelectBGM): scoreboard bgm

This commit is contained in:
2025-01-04 02:36:33 +00:00
parent 1f01b460ba
commit 3b75874ef3
5 changed files with 40 additions and 12 deletions

View File

@ -1,5 +1,4 @@
using MU3.Game;
using MU3.Sequence;
using MU3.Util;
using MU3.ViewData;
@ -9,13 +8,16 @@ class patch_Scene_32_PrePlayMusic_ChapterSelect: Scene_32_PrePlayMusic_ChapterSe
private ChapterSelectorItemViewData _selectItemViewData;
private extern void orig_onChangeElement(int index, int indexRaw);
private void onChangeElement(int index, int indexRaw) {
patch_GameBGM.WithholdPlay = true;
var state = Singleton<Mod.State>.instance;
// Dumb hack
state.WithholdPlay = true;
orig_onChangeElement(index, indexRaw);
patch_GameBGM.WithholdPlay = false;
state.WithholdPlay = false;
int selectorID = (
_selectItemViewData.memoryChapterViewData?.memoryChapterData
)?.getMemoryChapterSelectorID() ?? patch_Play.RecentID;
)?.getMemoryChapterSelectorID() ?? state.RecentBGM;
Singleton<GameSound>.instance.gameBGM.playBGM(233, selectorID);
}
}