Merge branch 'rewrite/master' into funkin-mobile/main
This commit is contained in:
@@ -1334,7 +1334,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||
result = [];
|
||||
trace('Initializing blank chart for difficulty ' + selectedDifficulty);
|
||||
currentSongChartData.notes.set(selectedDifficulty, result);
|
||||
currentSongMetadata.playData.difficulties.pushUnique(selectedDifficulty);
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
@@ -1343,7 +1342,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||
function set_currentSongChartNoteData(value:Array<SongNoteData>):Array<SongNoteData>
|
||||
{
|
||||
currentSongChartData.notes.set(selectedDifficulty, value);
|
||||
currentSongMetadata.playData.difficulties.pushUnique(selectedDifficulty);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -1636,9 +1634,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||
noteTooltipsDirty = true;
|
||||
notePreviewViewportBoundsDirty = true;
|
||||
|
||||
// Make sure the difficulty we selected is in the list of difficulties.
|
||||
currentSongMetadata.playData.difficulties.pushUnique(selectedDifficulty);
|
||||
|
||||
return selectedDifficulty;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,12 @@ class ChartEditorImportExportHandler
|
||||
{
|
||||
state.songMetadata = newSongMetadata;
|
||||
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.
|
||||
@@ -343,6 +349,12 @@ class ChartEditorImportExportHandler
|
||||
|
||||
var variations = state.availableVariations;
|
||||
|
||||
if (state.currentSongMetadata.playData.difficulties.pushUnique(state.selectedDifficulty))
|
||||
{
|
||||
// Just in case the user deleted all or didn't add a difficulty
|
||||
state.difficultySelectDirty = true;
|
||||
}
|
||||
|
||||
for (variation in variations)
|
||||
{
|
||||
var variationId:String = variation;
|
||||
|
||||
Reference in New Issue
Block a user