Skip to content

Commit

Permalink
Merge pull request #2323 from nebulazorua/main
Browse files Browse the repository at this point in the history
Chart debug key takes you back to chart editor if you're charting
  • Loading branch information
EliteMasterEric authored May 9, 2024
2 parents e3ee68a + f5143c2 commit 34a6e16
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2549,12 +2549,20 @@ class PlayState extends MusicBeatSubState
// Redirect to the chart editor playing the current song.
if (controls.DEBUG_CHART)
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
if (isChartingMode)
{
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
this.close(); // This only works because PlayState is a substate!
}
else
{
disableKeys = true;
persistentUpdate = false;
FlxG.switchState(() -> new ChartEditorState(
{
targetSongId: currentSong.id,
}));
}
}
#end

Expand Down

0 comments on commit 34a6e16

Please sign in to comment.