Merge pull request #2323 from nebulazorua/main

Chart debug key takes you back to chart editor if you're charting
This commit is contained in:
Eric 2024-05-08 23:14:59 -04:00 committed by GitHub
commit 34a6e16385
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2549,12 +2549,20 @@ class PlayState extends MusicBeatSubState
// Redirect to the chart editor playing the current song. // Redirect to the chart editor playing the current song.
if (controls.DEBUG_CHART) if (controls.DEBUG_CHART)
{ {
disableKeys = true; if (isChartingMode)
persistentUpdate = false; {
FlxG.switchState(() -> new ChartEditorState( if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
{ this.close(); // This only works because PlayState is a substate!
targetSongId: currentSong.id, }
})); else
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
}
} }
#end #end