Remove funkin.play.song.SongData and refactor app to match.
This commit is contained in:
@@ -36,13 +36,13 @@ import funkin.play.notes.NoteSprite;
|
||||
import funkin.play.notes.Strumline;
|
||||
import funkin.play.PlayState;
|
||||
import funkin.play.song.Song;
|
||||
import funkin.play.song.SongData.SongChartData;
|
||||
import funkin.play.song.SongData.SongDataParser;
|
||||
import funkin.play.song.SongData.SongEventData;
|
||||
import funkin.play.song.SongData.SongMetadata;
|
||||
import funkin.play.song.SongData.SongNoteData;
|
||||
import funkin.play.song.SongData.SongPlayableChar;
|
||||
import funkin.play.song.SongDataUtils;
|
||||
import funkin.data.song.SongData.SongChartData;
|
||||
import funkin.data.song.SongRegistry;
|
||||
import funkin.data.song.SongData.SongEventData;
|
||||
import funkin.data.song.SongData.SongMetadata;
|
||||
import funkin.data.song.SongData.SongNoteData;
|
||||
import funkin.data.song.SongData.SongPlayableChar;
|
||||
import funkin.data.song.SongDataUtils;
|
||||
import funkin.ui.debug.charting.ChartEditorCommand;
|
||||
import funkin.ui.debug.charting.ChartEditorCommand;
|
||||
import funkin.ui.debug.charting.ChartEditorThemeHandler.ChartEditorTheme;
|
||||
@@ -844,7 +844,7 @@ class ChartEditorState extends HaxeUIState
|
||||
var result:Null<SongChartData> = songChartData.get(selectedVariation);
|
||||
if (result == null)
|
||||
{
|
||||
result = new SongChartData(1.0, [], []);
|
||||
result = new SongChartData(["normal" => 1.0], [], ["normal" => []]);
|
||||
songChartData.set(selectedVariation, result);
|
||||
}
|
||||
return result;
|
||||
@@ -2555,8 +2555,7 @@ class ChartEditorState extends HaxeUIState
|
||||
|
||||
if (gridGhostNote == null) throw "ERROR: Tried to handle cursor, but gridGhostNote is null! Check ChartEditorState.buildGrid()";
|
||||
|
||||
var noteData:SongNoteData = gridGhostNote.noteData != null ? gridGhostNote.noteData : new SongNoteData(cursorMs, cursorColumn, 0,
|
||||
selectedNoteKind);
|
||||
var noteData:SongNoteData = gridGhostNote.noteData != null ? gridGhostNote.noteData : new SongNoteData(cursorMs, cursorColumn, 0, selectedNoteKind);
|
||||
|
||||
if (cursorColumn != noteData.data || selectedNoteKind != noteData.kind)
|
||||
{
|
||||
@@ -3947,7 +3946,7 @@ class ChartEditorState extends HaxeUIState
|
||||
*/
|
||||
public function loadSongAsTemplate(songId:String):Void
|
||||
{
|
||||
var song:Null<Song> = SongDataParser.fetchSong(songId);
|
||||
var song:Null<Song> = SongRegistry.instance.fetchEntry(songId);
|
||||
|
||||
if (song == null) return;
|
||||
|
||||
@@ -3965,7 +3964,7 @@ class ChartEditorState extends HaxeUIState
|
||||
var metadataClone = Reflect.copy(metadata);
|
||||
if (metadataClone != null) songMetadata.set(variation, metadataClone);
|
||||
|
||||
songChartData.set(variation, SongDataParser.parseSongChartData(songId, metadata.variation));
|
||||
songChartData.set(variation, SongRegistry.instance.parseEntryChartData(songId, metadata.variation));
|
||||
}
|
||||
|
||||
loadSong(songMetadata, songChartData);
|
||||
|
||||
Reference in New Issue
Block a user