mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-03-28 07:39:42 -04:00
Resolve merge issues
This commit is contained in:
parent
eebb2e874f
commit
8ef380e0b2
3 changed files with 16 additions and 4 deletions
source/funkin/ui/debug/charting
|
@ -4613,7 +4613,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
var prevDifficulty = availableDifficulties[availableDifficulties.length - 1];
|
||||
selectedDifficulty = prevDifficulty;
|
||||
|
||||
Conductor.mapTimeChanges(state.currentSongMetadata.timeChanges);
|
||||
Conductor.mapTimeChanges(this.currentSongMetadata.timeChanges);
|
||||
|
||||
refreshDifficultyTreeSelection();
|
||||
refreshMetadataToolbox();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package funkin.ui.debug.charting.commands;
|
||||
|
||||
import funkin.data.song.SongData.SongTimeChange;
|
||||
|
||||
/**
|
||||
* A command which changes the starting BPM of the song.
|
||||
*/
|
||||
|
@ -22,12 +24,12 @@ class ChangeStartingBPMCommand implements ChartEditorCommand
|
|||
if (timeChanges == null || timeChanges.length == 0)
|
||||
{
|
||||
previousBPM = 100;
|
||||
timeChanges = [new SongTimeChange(0, event.value)];
|
||||
timeChanges = [new SongTimeChange(0, targetBPM)];
|
||||
}
|
||||
else
|
||||
{
|
||||
previousBPM = timeChanges[0].bpm;
|
||||
timeChanges[0].bpm = event.value;
|
||||
timeChanges[0].bpm = targetBPM;
|
||||
}
|
||||
|
||||
state.currentSongMetadata.timeChanges = timeChanges;
|
||||
|
@ -51,4 +53,9 @@ class ChangeStartingBPMCommand implements ChartEditorCommand
|
|||
|
||||
Conductor.mapTimeChanges(state.currentSongMetadata.timeChanges);
|
||||
}
|
||||
|
||||
public function toString():String
|
||||
{
|
||||
return 'Change Starting BPM to ${targetBPM}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import funkin.play.character.BaseCharacter.CharacterType;
|
|||
import funkin.play.event.SongEvent;
|
||||
import funkin.data.event.SongEventData;
|
||||
import funkin.data.song.SongData.SongTimeChange;
|
||||
import funkin.ui.debug.charting.commands.ChangeStartingBPMCommand;
|
||||
import funkin.play.character.BaseCharacter.CharacterType;
|
||||
import funkin.play.character.CharacterData;
|
||||
import funkin.play.character.CharacterData.CharacterDataParser;
|
||||
|
@ -611,7 +612,11 @@ class ChartEditorToolboxHandler
|
|||
if (event.value == null || event.value <= 0) return;
|
||||
|
||||
// Use a command so we can undo/redo this action.
|
||||
state.performCommand(new ChangeStartingBPMCommand(event.value));
|
||||
var startingBPM = state.currentSongMetadata.timeChanges[0].bpm;
|
||||
if (event.value != startingBPM)
|
||||
{
|
||||
state.performCommand(new ChangeStartingBPMCommand(event.value));
|
||||
}
|
||||
};
|
||||
inputBPM.value = state.currentSongMetadata.timeChanges[0].bpm;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue