diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index d2ba83191..dadd5a3d9 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -289,6 +289,7 @@ class GameOverSubState extends MusicBeatSubState { gameOverMusic.loadEmbedded(musicPath); gameOverMusic.volume = startingVolume; + gameOverMusic.looped = !isEnding; gameOverMusic.play(); } } diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index 0145dee3f..948e9fa5b 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -274,7 +274,9 @@ class Strumline extends FlxSpriteGroup static function calculateNoteYPos(strumTime:Float, vwoosh:Bool = true):Float { // Make the note move faster visually as it moves offscreen. - var vwoosh:Float = (strumTime < Conductor.songPosition) && vwoosh ? 2.0 : 1.0; + // var vwoosh:Float = (strumTime < Conductor.songPosition) && vwoosh ? 2.0 : 1.0; + // ^^^ commented this out... do NOT make it move faster as it moves offscreen! + var vwoosh:Float = 1.0; var scrollSpeed:Float = PlayState.instance?.currentChart?.scrollSpeed ?? 1.0; return Constants.PIXELS_PER_MS * (Conductor.songPosition - strumTime) * scrollSpeed * vwoosh * (Preferences.downscroll ? 1 : -1); diff --git a/source/funkin/play/notes/SustainTrail.hx b/source/funkin/play/notes/SustainTrail.hx index ab4bf5f16..7367b97af 100644 --- a/source/funkin/play/notes/SustainTrail.hx +++ b/source/funkin/play/notes/SustainTrail.hx @@ -149,9 +149,9 @@ class SustainTrail extends FlxSprite if (sustainLength == s) return s; height = sustainHeight(s, getScrollSpeed()); - // updateColorTransform(); + this.sustainLength = s; updateClipping(); - return sustainLength = s; + return this.sustainLength; } /** @@ -162,13 +162,15 @@ class SustainTrail extends FlxSprite public function updateClipping(songTime:Float = 0):Void { var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height); - if (clipHeight == 0) + if (clipHeight <= 0.1) { visible = false; return; } else + { visible = true; + } var bottomHeight:Float = graphic.height * zoom * endOffset; var partHeight:Float = clipHeight - bottomHeight; diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 294c230d5..9dd3c7313 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -124,6 +124,7 @@ import flixel.group.FlxGroup.FlxTypedGroup; import funkin.audio.visualize.PolygonVisGroup; import flixel.input.mouse.FlxMouseEvent; import flixel.text.FlxText; +import flixel.system.debug.log.LogStyle; using Lambda; @@ -544,6 +545,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState */ var playtestPracticeMode:Bool = false; + /** + * Enables or disables the "debugger" popup that appears when you run into a flixel error. + */ + var enabledDebuggerPopup:Bool = true; + // Visuals /** @@ -2423,6 +2429,23 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState this.refreshToolbox(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT); } + playbarDifficulty.onClick = _ -> { + if (FlxG.keys.pressed.CONTROL) + { + this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); + } + else + { + incrementDifficulty(-1); + this.refreshToolbox(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT); + } + } + + playbarDifficulty.onRightClick = _ -> { + incrementDifficulty(1); + this.refreshToolbox(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT); + } + // Add functionality to the menu items. // File @@ -2604,10 +2627,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState menubarLabelPlaybackSpeed.text = 'Playback Speed - ${pitchDisplay}x'; } - playbarDifficulty.onClick = _ -> { - this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); - } - menubarItemToggleToolboxDifficulty.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, event.value); menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value); menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value); @@ -4462,8 +4481,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState if (playbarSongRemaining.value != songRemainingString) playbarSongRemaining.value = songRemainingString; playbarNoteSnap.text = '1/${noteSnapQuant}'; - playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase(); - playbarBPM.text = "BPM: " + (Conductor.currentTimeChange?.bpm ?? 0.0); + playbarDifficulty.text = '${selectedDifficulty.toTitleCase()}'; + // playbarBPM.text = 'BPM: ${(Conductor.currentTimeChange?.bpm ?? 0.0)}'; } function handlePlayhead():Void @@ -4821,11 +4840,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState FlxG.watch.addQuick('scrollPosInPixels', scrollPositionInPixels); FlxG.watch.addQuick('playheadPosInPixels', playheadPositionInPixels); - FlxG.watch.addQuick("tapNotesRendered", renderedNotes.members.length); - FlxG.watch.addQuick("holdNotesRendered", renderedHoldNotes.members.length); - FlxG.watch.addQuick("eventsRendered", renderedEvents.members.length); - FlxG.watch.addQuick("notesSelected", currentNoteSelection.length); - FlxG.watch.addQuick("eventsSelected", currentEventSelection.length); + FlxG.watch.addQuick("tapNotesRendered", renderedNotes?.members?.length); + FlxG.watch.addQuick("holdNotesRendered", renderedHoldNotes?.members?.length); + FlxG.watch.addQuick("eventsRendered", renderedEvents?.members?.length); + FlxG.watch.addQuick("notesSelected", currentNoteSelection?.length); + FlxG.watch.addQuick("eventsSelected", currentEventSelection?.length); } function handlePostUpdate():Void @@ -4861,6 +4880,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState return; } + LogStyle.WARNING.openConsole = enabledDebuggerPopup; + LogStyle.ERROR.openConsole = enabledDebuggerPopup; + // TODO: Rework asset system so we can remove this. switch (currentSongStage) { @@ -5190,7 +5212,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } } - this.success('Switch Difficulty', 'Switched difficulty to ${selectedDifficulty.toTitleCase()}'); + // Removed this notification because you can see your difficulty in the playbar now. + // this.success('Switch Difficulty', 'Switched difficulty to ${selectedDifficulty.toTitleCase()}'); } /** diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx index ff18a6966..ce1997968 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx @@ -347,6 +347,16 @@ class ChartEditorToolboxHandler state.playtestStartTime = checkboxStartTime.selected; }; + var checkboxDebugger:Null<CheckBox> = toolbox.findComponent('playtestDebuggerCheckbox', CheckBox); + + if (checkboxDebugger == null) throw 'ChartEditorToolboxHandler.buildToolboxPlaytestPropertiesLayout() - Could not find playtestDebuggerCheckbox component.'; + + state.enabledDebuggerPopup = checkboxDebugger.selected; + + checkboxDebugger.onClick = _ -> { + state.enabledDebuggerPopup = checkboxDebugger.selected; + }; + return toolbox; }