From f3737601f881bfb1406389e37ed22841ac66a222 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 11 Oct 2023 18:54:58 -0400 Subject: [PATCH 1/5] Can't spam enter on pause menu or freeplay menu anymore --- source/funkin/FreeplayState.hx | 23 ++++++++++++++++++----- source/funkin/PauseSubState.hx | 12 +++++++++++- source/funkin/ui/StickerSubState.hx | 10 ++++++---- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/source/funkin/FreeplayState.hx b/source/funkin/FreeplayState.hx index 3ae32c2e4..ccb89a7ca 100644 --- a/source/funkin/FreeplayState.hx +++ b/source/funkin/FreeplayState.hx @@ -570,7 +570,7 @@ class FreeplayState extends MusicBeatSubState var randomCapsule:SongMenuItem = grpCapsules.recycle(SongMenuItem); randomCapsule.init(FlxG.width, 0, "Random"); randomCapsule.onConfirm = function() { - trace("RANDOM SELECTED"); + capsuleOnConfirmRandom(randomCapsule); }; randomCapsule.y = randomCapsule.intendedY(0) + 10; randomCapsule.targetPos.x = randomCapsule.x; @@ -643,6 +643,8 @@ class FreeplayState extends MusicBeatSubState var spamTimer:Float = 0; var spamming:Bool = false; + var busy:Bool = false; // Set to true once the user has pressed enter to select a song. + override function update(elapsed:Float) { super.update(elapsed); @@ -690,11 +692,13 @@ class FreeplayState extends MusicBeatSubState fp.updateScore(Std.int(lerpScore)); txtCompletion.text = Math.floor(lerpCompletion * 100) + "%"; - // trace(Highscore.getCompletion(songs[curSelected].songName, curDifficulty)); - // trace(intendedScore); - // trace(lerpScore); - // Highscore.getAllScores(); + handleInputs(elapsed); + } + + function handleInputs(elapsed:Float):Void + { + if (busy) return; var upP = controls.UI_UP_P; var downP = controls.UI_DOWN_P; @@ -949,6 +953,13 @@ class FreeplayState extends MusicBeatSubState } } + function capsuleOnConfirmRandom(cap:SongMenuItem):Void + { + trace("RANDOM SELECTED"); + + busy = true; + } + function capsuleOnConfirmDefault(cap:SongMenuItem):Void { // var poop:String = songs[curSelected].songName.toLowerCase(); @@ -963,6 +974,8 @@ class FreeplayState extends MusicBeatSubState curDifficulty = 1; }*/ + busy = true; + PlayStatePlaylist.isStoryMode = false; var songId:String = cap.songTitle.toLowerCase(); diff --git a/source/funkin/PauseSubState.hx b/source/funkin/PauseSubState.hx index f93e5a450..54c3a530b 100644 --- a/source/funkin/PauseSubState.hx +++ b/source/funkin/PauseSubState.hx @@ -150,6 +150,11 @@ class PauseSubState extends MusicBeatSubState super.update(elapsed); + handleInputs(); + } + + function handleInputs():Void + { var upP = controls.UI_UP_P; var downP = controls.UI_DOWN_P; var accepted = controls.ACCEPT; @@ -229,9 +234,14 @@ class PauseSubState extends MusicBeatSubState FlxTransitionableState.skipNextTransIn = true; FlxTransitionableState.skipNextTransOut = true; - if (PlayStatePlaylist.isStoryMode) openSubState(new funkin.ui.StickerSubState(null, STORY)); + if (PlayStatePlaylist.isStoryMode) + { + openSubState(new funkin.ui.StickerSubState(null, STORY)); + } else + { openSubState(new funkin.ui.StickerSubState(null, FREEPLAY)); + } case 'Exit to Chart Editor': this.close(); diff --git a/source/funkin/ui/StickerSubState.hx b/source/funkin/ui/StickerSubState.hx index bde36b160..ebf75cb34 100644 --- a/source/funkin/ui/StickerSubState.hx +++ b/source/funkin/ui/StickerSubState.hx @@ -206,6 +206,8 @@ class StickerSubState extends MusicBeatSubState sticker.timing = FlxMath.remapToRange(ind, 0, grpStickers.members.length, 0, 0.9); new FlxTimer().start(sticker.timing, _ -> { + if (grpStickers == null) return; + sticker.visible = true; var daSound:String = FlxG.random.getObject(sounds); FlxG.sound.play(Paths.sound(daSound)); @@ -269,10 +271,10 @@ class StickerSubState extends MusicBeatSubState { super.update(elapsed); - if (FlxG.keys.justPressed.ANY) - { - regenStickers(); - } + // if (FlxG.keys.justPressed.ANY) + // { + // regenStickers(); + // } } var switchingState:Bool = false; From dd3d1116c09dff9d26dc6838e0507aafb16c0646 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 12 Oct 2023 13:22:59 -0400 Subject: [PATCH 2/5] Add a flag to make Git hash display on launcher builds. --- Project.xml | 7 +++++++ source/funkin/util/Constants.hx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Project.xml b/Project.xml index ccf6c83a3..9d09d2457 100644 --- a/Project.xml +++ b/Project.xml @@ -196,6 +196,13 @@ +
+ + + + +
+ --> --> diff --git a/source/funkin/util/Constants.hx b/source/funkin/util/Constants.hx index efabf10c3..ffaf7b9ec 100644 --- a/source/funkin/util/Constants.hx +++ b/source/funkin/util/Constants.hx @@ -39,7 +39,7 @@ class Constants */ public static final VERSION_SUFFIX:String = ' PROTOTYPE'; - #if debug + #if (debug || FORCE_DEBUG_VERSION) static function get_VERSION():String { return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH})' + VERSION_SUFFIX; From 9ec3f7aaacd9c7f05b09ab2c7bcf9f8e07dc22fe Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 12 Oct 2023 19:57:16 -0400 Subject: [PATCH 3/5] Fix to FORCE_DEBUG_VERSION flag --- source/funkin/util/Constants.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/util/Constants.hx b/source/funkin/util/Constants.hx index ffaf7b9ec..28f864d0e 100644 --- a/source/funkin/util/Constants.hx +++ b/source/funkin/util/Constants.hx @@ -71,7 +71,7 @@ class Constants */ // ============================== - #if debug + #if (debug || FORCE_DEBUG_VERSION) /** * The current Git branch. */ From c1684b218e3051786e0f1eaa9acbb4d78a88c9f3 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 12 Oct 2023 20:17:41 -0400 Subject: [PATCH 4/5] More fixes to github actions --- Project.xml | 10 +++++++++- source/funkin/util/macro/GitCommit.hx | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Project.xml b/Project.xml index 9d09d2457..69400d8b1 100644 --- a/Project.xml +++ b/Project.xml @@ -156,7 +156,6 @@ - @@ -196,6 +195,15 @@ + +
+ + +
+
diff --git a/source/funkin/util/macro/GitCommit.hx b/source/funkin/util/macro/GitCommit.hx index 0449857cd..d0c034828 100644 --- a/source/funkin/util/macro/GitCommit.hx +++ b/source/funkin/util/macro/GitCommit.hx @@ -1,6 +1,6 @@ package funkin.util.macro; -#if debug +#if (debug || FORCE_DEBUG_VERSION) class GitCommit { /** From dd38dbbadfc5d04c7df7b1ff31cb31bbc0886c09 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sat, 14 Oct 2023 23:57:40 -0400 Subject: [PATCH 5/5] Tweaked the numbers on scrolling --- .../funkin/ui/debug/charting/ChartEditorState.hx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 67e3c1dc8..5e4dded91 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -1920,33 +1920,33 @@ class ChartEditorState extends HaxeUIState // Mouse Wheel = Scroll if (FlxG.mouse.wheel != 0 && !FlxG.keys.pressed.CONTROL) { - scrollAmount = -10 * FlxG.mouse.wheel; + scrollAmount = -50 * FlxG.mouse.wheel; shouldPause = true; } // Up Arrow = Scroll Up if (upKeyHandler.activated && currentLiveInputStyle == None) { - scrollAmount = -GRID_SIZE * 0.25 * 5.0; + scrollAmount = -GRID_SIZE * 0.25 * 25.0; shouldPause = true; } // Down Arrow = Scroll Down if (downKeyHandler.activated && currentLiveInputStyle == None) { - scrollAmount = GRID_SIZE * 0.25 * 5.0; + scrollAmount = GRID_SIZE * 0.25 * 25.0; shouldPause = true; } // W = Scroll Up (doesn't work with Ctrl+Scroll) if (wKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL) { - scrollAmount = -GRID_SIZE * 0.25 * 5.0; + scrollAmount = -GRID_SIZE * 0.25 * 25.0; shouldPause = true; } // S = Scroll Down (doesn't work with Ctrl+Scroll) if (sKeyHandler.activated && currentLiveInputStyle == None && !FlxG.keys.pressed.CONTROL) { - scrollAmount = GRID_SIZE * 0.25 * 5.0; + scrollAmount = GRID_SIZE * 0.25 * 25.0; shouldPause = true; } @@ -2011,7 +2011,7 @@ class ChartEditorState extends HaxeUIState // SHIFT + Scroll = Scroll Fast if (FlxG.keys.pressed.SHIFT) { - scrollAmount *= 5; + scrollAmount *= 2; } // CONTROL + Scroll = Scroll Precise if (FlxG.keys.pressed.CONTROL) @@ -3287,7 +3287,7 @@ class ChartEditorState extends HaxeUIState */ function handleTestKeybinds():Void { - if (!isHaxeUIDialogOpen && FlxG.keys.justPressed.ENTER) + if (!isHaxeUIDialogOpen && !isCursorOverHaxeUI && FlxG.keys.justPressed.ENTER) { var minimal = FlxG.keys.pressed.SHIFT; testSongInPlayState(minimal);