mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-20 07:25:59 +00:00
Merge branch 'rewrite/master' into rewrite/bugfix/chart-editor-more-fixes
This commit is contained in:
commit
902ad4be3a
1
.gitmodules
vendored
1
.gitmodules
vendored
|
@ -1,6 +1,7 @@
|
|||
[submodule "assets"]
|
||||
path = assets
|
||||
url = https://github.com/FunkinCrew/Funkin-history-rewrite-assets
|
||||
branch = master
|
||||
[submodule "art"]
|
||||
path = art
|
||||
url = https://github.com/FunkinCrew/Funkin-history-rewrite-art
|
||||
|
|
|
@ -102,6 +102,9 @@ class GameOverSubState extends MusicBeatSubState
|
|||
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);
|
||||
cameraFollowPoint.x = boyfriend.getGraphicMidpoint().x;
|
||||
cameraFollowPoint.y = boyfriend.getGraphicMidpoint().y;
|
||||
var offsets:Array<Float> = boyfriend.getDeathCameraOffsets();
|
||||
cameraFollowPoint.x += offsets[0];
|
||||
cameraFollowPoint.y += offsets[1];
|
||||
add(cameraFollowPoint);
|
||||
|
||||
FlxG.camera.target = null;
|
||||
|
|
|
@ -1649,7 +1649,7 @@ class PlayState extends MusicBeatSubState
|
|||
*/
|
||||
function onConversationComplete():Void
|
||||
{
|
||||
isInCutscene = true;
|
||||
isInCutscene = false;
|
||||
remove(currentConversation);
|
||||
currentConversation = null;
|
||||
|
||||
|
|
|
@ -188,6 +188,11 @@ class BaseCharacter extends Bopper
|
|||
shouldBop = false;
|
||||
}
|
||||
|
||||
public function getDeathCameraOffsets():Array<Float>
|
||||
{
|
||||
return _data.death?.cameraOffsets ?? [0.0, 0.0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of flipX from the character data.
|
||||
* `!getFlipX()` is the direction Boyfriend should face.
|
||||
|
|
|
@ -19,8 +19,10 @@ class CharacterDataParser
|
|||
* The current version string for the stage data format.
|
||||
* Handle breaking changes by incrementing this value
|
||||
* and adding migration to the `migrateStageData()` function.
|
||||
*
|
||||
* - Version 1.0.1 adds `death.cameraOffsets`
|
||||
*/
|
||||
public static final CHARACTER_DATA_VERSION:String = '1.0.0';
|
||||
public static final CHARACTER_DATA_VERSION:String = '1.0.1';
|
||||
|
||||
/**
|
||||
* The current version rule check for the stage data format.
|
||||
|
@ -603,6 +605,8 @@ typedef CharacterData =
|
|||
*/
|
||||
var healthIcon:Null<HealthIconData>;
|
||||
|
||||
var death:Null<DeathData>;
|
||||
|
||||
/**
|
||||
* The global offset to the character's position, in pixels.
|
||||
* @default [0, 0]
|
||||
|
@ -695,3 +699,13 @@ typedef HealthIconData =
|
|||
*/
|
||||
var offsets:Null<Array<Float>>;
|
||||
}
|
||||
|
||||
typedef DeathData =
|
||||
{
|
||||
/**
|
||||
* The amount to offset the camera by while focusing on this character as they die.
|
||||
* Default value focuses on the character's graphic midpoint.
|
||||
* @default [0, 0]
|
||||
*/
|
||||
var ?cameraOffsets:Array<Float>;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class AddNotesCommand implements ChartEditorCommand
|
|||
state.currentEventSelection = [];
|
||||
}
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteLay'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -80,7 +80,7 @@ class AddNotesCommand implements ChartEditorCommand
|
|||
state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, notes);
|
||||
state.currentNoteSelection = [];
|
||||
state.currentEventSelection = [];
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -116,7 +116,8 @@ class RemoveNotesCommand implements ChartEditorCommand
|
|||
state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, notes);
|
||||
state.currentNoteSelection = [];
|
||||
state.currentEventSelection = [];
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01'));
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -133,7 +134,7 @@ class RemoveNotesCommand implements ChartEditorCommand
|
|||
}
|
||||
state.currentNoteSelection = notes;
|
||||
state.currentEventSelection = [];
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -254,7 +255,7 @@ class AddEventsCommand implements ChartEditorCommand
|
|||
state.currentEventSelection = events;
|
||||
}
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteLay'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -298,7 +299,8 @@ class RemoveEventsCommand implements ChartEditorCommand
|
|||
{
|
||||
state.currentSongChartEventData = SongDataUtils.subtractEvents(state.currentSongChartEventData, events);
|
||||
state.currentEventSelection = [];
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01'));
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -314,7 +316,7 @@ class RemoveEventsCommand implements ChartEditorCommand
|
|||
state.currentSongChartEventData.push(event);
|
||||
}
|
||||
state.currentEventSelection = events;
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -354,7 +356,7 @@ class RemoveItemsCommand implements ChartEditorCommand
|
|||
state.currentNoteSelection = [];
|
||||
state.currentEventSelection = [];
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -378,7 +380,7 @@ class RemoveItemsCommand implements ChartEditorCommand
|
|||
state.currentNoteSelection = notes;
|
||||
state.currentEventSelection = events;
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
state.saveDataDirty = true;
|
||||
state.noteDisplayDirty = true;
|
||||
|
@ -805,6 +807,8 @@ class PasteItemsCommand implements ChartEditorCommand
|
|||
|
||||
public function undo(state:ChartEditorState):Void
|
||||
{
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, addedNotes);
|
||||
state.currentSongChartEventData = SongDataUtils.subtractEvents(state.currentSongChartEventData, addedEvents);
|
||||
state.currentNoteSelection = [];
|
||||
|
@ -857,6 +861,8 @@ class ExtendNoteLengthCommand implements ChartEditorCommand
|
|||
|
||||
public function undo(state:ChartEditorState):Void
|
||||
{
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo'));
|
||||
|
||||
note.length = oldLength;
|
||||
|
||||
state.saveDataDirty = true;
|
||||
|
|
|
@ -2144,11 +2144,18 @@ class ChartEditorState extends HaxeUIState
|
|||
}
|
||||
}
|
||||
|
||||
var dragLengthCurrent:Float = 0;
|
||||
var stretchySounds:Bool = false;
|
||||
|
||||
/**
|
||||
* Handle display of the mouse cursor.
|
||||
*/
|
||||
function handleCursor():Void
|
||||
{
|
||||
// Mouse sounds
|
||||
if (FlxG.mouse.justPressed) FlxG.sound.play(Paths.sound("chartingSounds/ClickDown"));
|
||||
if (FlxG.mouse.justReleased) FlxG.sound.play(Paths.sound("chartingSounds/ClickUp"));
|
||||
|
||||
// Note: If a menu is open in HaxeUI, don't handle cursor behavior.
|
||||
var shouldHandleCursor:Bool = !isCursorOverHaxeUI || (selectionBoxStartPos != null);
|
||||
var eventColumn:Int = (STRUMLINE_SIZE * 2 + 1) - 1;
|
||||
|
@ -2497,6 +2504,14 @@ class ChartEditorState extends HaxeUIState
|
|||
{
|
||||
if (dragLengthSteps > 0)
|
||||
{
|
||||
if (dragLengthCurrent != dragLengthSteps)
|
||||
{
|
||||
stretchySounds = !stretchySounds;
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/stretch' + (stretchySounds ? '1' : '2') + '_UI'));
|
||||
|
||||
dragLengthCurrent = dragLengthSteps;
|
||||
}
|
||||
|
||||
gridGhostHoldNote.visible = true;
|
||||
gridGhostHoldNote.noteData = gridGhostNote.noteData;
|
||||
gridGhostHoldNote.noteDirection = gridGhostNote.noteData.getDirection();
|
||||
|
@ -2515,6 +2530,7 @@ class ChartEditorState extends HaxeUIState
|
|||
{
|
||||
if (dragLengthSteps > 0)
|
||||
{
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/stretchSNAP_UI'));
|
||||
// Apply the new length.
|
||||
performCommand(new ExtendNoteLengthCommand(currentPlaceNoteData, dragLengthMs));
|
||||
}
|
||||
|
@ -3915,9 +3931,9 @@ class ChartEditorState extends HaxeUIState
|
|||
switch (noteData.getStrumlineIndex())
|
||||
{
|
||||
case 0: // Player
|
||||
if (hitsoundsEnabledPlayer) ChartEditorAudioHandler.playSound(Paths.sound('ui/chart-editor/playerHitsound'));
|
||||
if (hitsoundsEnabledPlayer) ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/hitNotePlayer'));
|
||||
case 1: // Opponent
|
||||
if (hitsoundsEnabledOpponent) ChartEditorAudioHandler.playSound(Paths.sound('ui/chart-editor/opponentHitsound'));
|
||||
if (hitsoundsEnabledOpponent) ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/hitNoteOpponent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4294,7 +4310,7 @@ class ChartEditorState extends HaxeUIState
|
|||
|
||||
function playMetronomeTick(high:Bool = false):Void
|
||||
{
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('pianoStuff/piano-${high ? '001' : '008'}'));
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/metronome${high ? '1' : '2'}'));
|
||||
}
|
||||
|
||||
function isNoteSelected(note:Null<SongNoteData>):Bool
|
||||
|
|
|
@ -72,6 +72,8 @@ class ChartEditorToolboxHandler
|
|||
{
|
||||
toolbox.showDialog(false);
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/openWindow'));
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_TOOLS_LAYOUT:
|
||||
|
@ -109,6 +111,8 @@ class ChartEditorToolboxHandler
|
|||
{
|
||||
toolbox.hideDialog(DialogButton.CANCEL);
|
||||
|
||||
ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/exitWindow'));
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case ChartEditorState.CHART_EDITOR_TOOLBOX_TOOLS_LAYOUT:
|
||||
|
|
Loading…
Reference in a new issue