using MU3.Game; using MU3.Util; using MU3.ViewData; namespace MU3; class patch_Scene_32_PrePlayMusic_ChapterSelect: Scene_32_PrePlayMusic_ChapterSelect { private ChapterSelectorItemViewData _selectItemViewData; private extern void orig_onChangeElement(int index, int indexRaw); private void onChangeElement(int index, int indexRaw) { var state = Singleton.instance; // Dumb hack state.WithholdPlay = true; orig_onChangeElement(index, indexRaw); state.WithholdPlay = false; int selectorID = ( _selectItemViewData.memoryChapterViewData?.memoryChapterData )?.getMemoryChapterSelectorID() ?? state.RecentBGM; Singleton.instance.gameBGM.playBGM(233, selectorID); } }