mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-25 16:24:40 +00:00
Fixed issue where ChartEditorState was not copying SongMetadata properly
This commit is contained in:
parent
f4bc682ea1
commit
8431e18d37
|
@ -290,7 +290,7 @@ class Conductor
|
||||||
|
|
||||||
if (timeChanges.length > 0)
|
if (timeChanges.length > 0)
|
||||||
{
|
{
|
||||||
trace('Done mapping time changes: ${timeChanges}' + timeChanges);
|
trace('Done mapping time changes: ${timeChanges}');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update currentStepTime
|
// Update currentStepTime
|
||||||
|
|
|
@ -86,6 +86,11 @@ class SongMetadata
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongMetadata(${this.songName} by ${this.artist}, variation ${this.variation})';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum abstract SongTimeFormat(String) from String to String
|
enum abstract SongTimeFormat(String) from String to String
|
||||||
|
@ -162,6 +167,11 @@ class SongTimeChange
|
||||||
this.beatTime = beatTime == null ? DEFAULT_BEAT_TIME : beatTime;
|
this.beatTime = beatTime == null ? DEFAULT_BEAT_TIME : beatTime;
|
||||||
this.beatTuplets = beatTuplets == null ? DEFAULT_BEAT_TUPLETS : beatTuplets;
|
this.beatTuplets = beatTuplets == null ? DEFAULT_BEAT_TUPLETS : beatTuplets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongTimeChange(${this.timeStamp}ms,${this.bpm}bpm)';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,6 +242,11 @@ class SongMusicData
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongMusicData(${this.songName} by ${this.artist}, variation ${this.variation})';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef SongPlayData =
|
typedef SongPlayData =
|
||||||
|
@ -271,6 +286,11 @@ class SongPlayableChar
|
||||||
this.opponent = opponent;
|
this.opponent = opponent;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongPlayableChar(${this.girlfriend}, ${this.opponent}, ${this.inst})';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SongChartData
|
class SongChartData
|
||||||
|
@ -455,6 +475,11 @@ class SongEventData
|
||||||
{
|
{
|
||||||
return this.time <= other.time;
|
return this.time <= other.time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongEventData(${this.time}ms, ${this.event}: ${this.value})';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SongNoteData
|
class SongNoteData
|
||||||
|
@ -646,4 +671,10 @@ class SongNoteData
|
||||||
{
|
{
|
||||||
return this.time <= other.time;
|
return this.time <= other.time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toString():String
|
||||||
|
{
|
||||||
|
return 'SongNoteData(${this.time}ms, ' + (this.length > 0 ? '[${this.length}ms hold]' : '') + ' ${this.data}'
|
||||||
|
+ (this.kind != '' ? ' [kind: ${this.kind}])' : ')');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3961,7 +3961,7 @@ class ChartEditorState extends HaxeUIState
|
||||||
var variation = (metadata.variation == null || metadata.variation == '') ? 'default' : metadata.variation;
|
var variation = (metadata.variation == null || metadata.variation == '') ? 'default' : metadata.variation;
|
||||||
|
|
||||||
// Clone to prevent modifying the original.
|
// Clone to prevent modifying the original.
|
||||||
var metadataClone = Reflect.copy(metadata);
|
var metadataClone:SongMetadata = metadata.clone(variation);
|
||||||
if (metadataClone != null) songMetadata.set(variation, metadataClone);
|
if (metadataClone != null) songMetadata.set(variation, metadataClone);
|
||||||
|
|
||||||
songChartData.set(variation, SongRegistry.instance.parseEntryChartData(songId, metadata.variation));
|
songChartData.set(variation, SongRegistry.instance.parseEntryChartData(songId, metadata.variation));
|
||||||
|
@ -3969,18 +3969,6 @@ class ChartEditorState extends HaxeUIState
|
||||||
|
|
||||||
loadSong(songMetadata, songChartData);
|
loadSong(songMetadata, songChartData);
|
||||||
|
|
||||||
notePreviewDirty = true;
|
|
||||||
notePreviewViewportBoundsDirty = true;
|
|
||||||
|
|
||||||
if (audioInstTrack != null)
|
|
||||||
{
|
|
||||||
audioInstTrack.stop();
|
|
||||||
audioInstTrack = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Conductor.forceBPM(null); // Disable the forced BPM.
|
|
||||||
Conductor.mapTimeChanges(currentSongMetadata.timeChanges);
|
|
||||||
|
|
||||||
sortChartData();
|
sortChartData();
|
||||||
|
|
||||||
clearVocals();
|
clearVocals();
|
||||||
|
@ -4024,6 +4012,8 @@ class ChartEditorState extends HaxeUIState
|
||||||
Conductor.forceBPM(null); // Disable the forced BPM.
|
Conductor.forceBPM(null); // Disable the forced BPM.
|
||||||
Conductor.mapTimeChanges(currentSongMetadata.timeChanges);
|
Conductor.mapTimeChanges(currentSongMetadata.timeChanges);
|
||||||
|
|
||||||
|
notePreviewDirty = true;
|
||||||
|
notePreviewViewportBoundsDirty = true;
|
||||||
difficultySelectDirty = true;
|
difficultySelectDirty = true;
|
||||||
opponentPreviewDirty = true;
|
opponentPreviewDirty = true;
|
||||||
playerPreviewDirty = true;
|
playerPreviewDirty = true;
|
||||||
|
|
Loading…
Reference in a new issue