From 97ea4b0891f9de979ac9869d3708a6abfc3824f9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 5 Jan 2024 20:23:15 -0500 Subject: [PATCH] re-add debug_refreshModules? --- source/funkin/ui/MusicBeatState.hx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/funkin/ui/MusicBeatState.hx b/source/funkin/ui/MusicBeatState.hx index 7d691c294..ffd065901 100644 --- a/source/funkin/ui/MusicBeatState.hx +++ b/source/funkin/ui/MusicBeatState.hx @@ -125,6 +125,16 @@ class MusicBeatState extends FlxTransitionableState implements IEventHandler ModuleHandler.callEvent(event); } + function debug_refreshModules() + { + PolymodHandler.forceReloadAssets(); + + this.destroy(); + + // Create a new instance of the current state, so old data is cleared. + FlxG.resetState(); + } + public function stepHit():Bool { var event = new SongTimeScriptEvent(SONG_STEP_HIT, Conductor.instance.currentBeat, Conductor.instance.currentStep);