forked from akanyan/mu3-mods
24 lines
783 B
C#
24 lines
783 B
C#
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<Mod.State>.instance;
|
|
|
|
// Dumb hack
|
|
state.WithholdPlay = true;
|
|
orig_onChangeElement(index, indexRaw);
|
|
state.WithholdPlay = false;
|
|
|
|
int selectorID = (
|
|
_selectItemViewData.memoryChapterViewData?.memoryChapterData
|
|
)?.getMemoryChapterSelectorID() ?? state.RecentBGM;
|
|
Singleton<GameSound>.instance.gameBGM.playBGM(233, selectorID);
|
|
}
|
|
}
|