fix: Prevent loading invalid variation

This commit is contained in:
Hyper_
2025-04-30 00:44:12 -04:00
committed by Eric
parent 3e0dbe2758
commit c5f2a74494
@@ -119,6 +119,11 @@ class ChartEditorImportExportHandler
state.songChartData = newSongChartData;
state.selectedDifficulty = state.availableDifficulties[0];
if (!newSongMetadata.exists(state.selectedVariation))
{
state.selectedVariation = Constants.DEFAULT_VARIATION;
}
Conductor.instance.forceBPM(null); // Disable the forced BPM.
Conductor.instance.instrumentalOffset = state.currentInstrumentalOffset; // Loads from the metadata.
Conductor.instance.mapTimeChanges(state.currentSongMetadata.timeChanges);