From bb0fb0281372c5843995a19cda7a9bba5545783f Mon Sep 17 00:00:00 2001 From: EliteMasterEric <ericmyllyoja@gmail.com> Date: Tue, 19 Dec 2023 01:26:43 -0500 Subject: [PATCH] Fix to launching directly into Chart Editor --- source/funkin/Conductor.hx | 14 +++++++------- .../funkin/ui/debug/charting/ChartEditorState.hx | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/funkin/Conductor.hx b/source/funkin/Conductor.hx index c531678ad..7b34bffe2 100644 --- a/source/funkin/Conductor.hx +++ b/source/funkin/Conductor.hx @@ -37,7 +37,7 @@ class Conductor /** * The most recent time change for the current song position. */ - public static var currentTimeChange(default, null):SongTimeChange; + public static var currentTimeChange(default, null):Null<SongTimeChange>; /** * The current position in the song in milliseconds. @@ -132,32 +132,32 @@ class Conductor /** * Current position in the song, in measures. */ - public static var currentMeasure(default, null):Int; + public static var currentMeasure(default, null):Int = 0; /** * Current position in the song, in beats. */ - public static var currentBeat(default, null):Int; + public static var currentBeat(default, null):Int = 0; /** * Current position in the song, in steps. */ - public static var currentStep(default, null):Int; + public static var currentStep(default, null):Int = 0; /** * Current position in the song, in measures and fractions of a measure. */ - public static var currentMeasureTime(default, null):Float; + public static var currentMeasureTime(default, null):Float = 0; /** * Current position in the song, in beats and fractions of a measure. */ - public static var currentBeatTime(default, null):Float; + public static var currentBeatTime(default, null):Float = 0; /** * Current position in the song, in steps and fractions of a step. */ - public static var currentStepTime(default, null):Float; + public static var currentStepTime(default, null):Float = 0; /** * An offset tied to the current chart file to compensate for a delay in the instrumental. diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 8369e95b9..de38a8fda 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -4387,7 +4387,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState playbarNoteSnap.text = '1/${noteSnapQuant}'; playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase(); - playbarBPM.text = "BPM: " + Conductor.currentTimeChange.bpm; + playbarBPM.text = "BPM: " + (Conductor.currentTimeChange?.bpm ?? 0.0); } function handlePlayhead():Void