From 4bf58aeda5b66a6b4a9a2cfa5f2e1536d8c95bad Mon Sep 17 00:00:00 2001 From: NyxieFemboy <132237065+NyxieFemboy@users.noreply.github.com> Date: Sun, 24 Nov 2024 13:39:17 -0500 Subject: [PATCH 1/3] Fixing the split vocals not pausing issue in charter (#456) --- .gitignore | 3 ++- source/funkin/editors/charter/ChartDataScreen.hx | 1 + source/funkin/editors/charter/CharterEventScreen.hx | 1 + source/funkin/editors/charter/CharterMetaDataScreen.hx | 1 + source/funkin/editors/charter/CharterNoteTypesList.hx | 1 + source/funkin/editors/charter/CharterStrumlineScreen.hx | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 59fb2c287..0b7c366da 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ latest/windows/haxe/ .haxelib/ pages/ docs/doc.xml -mods/Baldi's Basics in Funkin'/ \ No newline at end of file +mods/* +!mods/readme.txt \ No newline at end of file diff --git a/source/funkin/editors/charter/ChartDataScreen.hx b/source/funkin/editors/charter/ChartDataScreen.hx index b4592d056..c629c7dec 100644 --- a/source/funkin/editors/charter/ChartDataScreen.hx +++ b/source/funkin/editors/charter/ChartDataScreen.hx @@ -23,6 +23,7 @@ class ChartDataScreen extends UISubstateWindow { public override function create() { FlxG.sound.music.pause(); Charter.instance.vocals.pause(); + for (strumLine in Charter.instance.strumLines.members) strumLine.vocals.pause(); winTitle = 'Chart Properties'; winWidth = 420; winHeight = 230; // guys look, the funny numbers! diff --git a/source/funkin/editors/charter/CharterEventScreen.hx b/source/funkin/editors/charter/CharterEventScreen.hx index 31d625800..7c2c03c19 100644 --- a/source/funkin/editors/charter/CharterEventScreen.hx +++ b/source/funkin/editors/charter/CharterEventScreen.hx @@ -41,6 +41,7 @@ class CharterEventScreen extends UISubstateWindow { FlxG.sound.music.pause(); // prevent the song from continuing Charter.instance.vocals.pause(); + for (strumLine in Charter.instance.strumLines.members) strumLine.vocals.pause(); events = chartEvent.events.copy(); diff --git a/source/funkin/editors/charter/CharterMetaDataScreen.hx b/source/funkin/editors/charter/CharterMetaDataScreen.hx index 900cc721e..4179dfc7b 100644 --- a/source/funkin/editors/charter/CharterMetaDataScreen.hx +++ b/source/funkin/editors/charter/CharterMetaDataScreen.hx @@ -40,6 +40,7 @@ class CharterMetaDataScreen extends UISubstateWindow { FlxG.sound.music.pause(); Charter.instance.vocals.pause(); + for (strumLine in Charter.instance.strumLines.members) strumLine.vocals.pause(); function addLabelOn(ui:UISprite, text:String) add(new UIText(ui.x, ui.y - 24, 0, text)); diff --git a/source/funkin/editors/charter/CharterNoteTypesList.hx b/source/funkin/editors/charter/CharterNoteTypesList.hx index b1cc28b63..827cfa7eb 100644 --- a/source/funkin/editors/charter/CharterNoteTypesList.hx +++ b/source/funkin/editors/charter/CharterNoteTypesList.hx @@ -13,6 +13,7 @@ class CharterNoteTypesList extends UISubstateWindow { public override function create() { FlxG.sound.music.pause(); Charter.instance.vocals.pause(); + for (strumLine in Charter.instance.strumLines.members) strumLine.vocals.pause(); winTitle = 'Note Types List Editor'; winWidth = 380; winHeight = 390; diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index 266962517..d9298430c 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -52,6 +52,7 @@ class CharterStrumlineScreen extends UISubstateWindow { FlxG.sound.music.pause(); Charter.instance.vocals.pause(); + for (strumLine in Charter.instance.strumLines.members) strumLine.vocals.pause(); super.create(); From 4295d424941537d5a36dad4f8ae3526910d1f25e Mon Sep 17 00:00:00 2001 From: SrtHero278 Date: Mon, 25 Nov 2024 10:16:34 -0800 Subject: [PATCH 2/3] quick fix --- source/funkin/game/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index a22ab6197..1b5bf86c9 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -686,7 +686,7 @@ class PlayState extends MusicBeatState startingPos, strumLine.strumScale == null ? 1 : strumLine.strumScale, strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))), - strumLine.type != 1, coopMode ? (strumLine.type == 1 ? controlsP1 : controlsP2) : controls, + strumLine.type != 1, coopMode ? ((strumLine.type == 1) != opponentMode ? controlsP1 : controlsP2) : controls, strumLine.vocalsSuffix ); strLine.cameras = [camHUD]; From a2a12f121ec388703f003f53dd4be689402099cd Mon Sep 17 00:00:00 2001 From: SrtHero278 Date: Mon, 25 Nov 2024 11:33:48 -0800 Subject: [PATCH 3/3] quick fix 2 classes not using the correct line number. --- source/funkin/backend/scripting/HScript.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/funkin/backend/scripting/HScript.hx b/source/funkin/backend/scripting/HScript.hx index 37aaaa950..0597a32f8 100644 --- a/source/funkin/backend/scripting/HScript.hx +++ b/source/funkin/backend/scripting/HScript.hx @@ -74,8 +74,10 @@ class HScript extends Script { var code = Assets.getText(p); var expr:Expr = null; try { - if (code != null && code.trim() != "") + if (code != null && code.trim() != "") { + parser.line = 1; // fun fact: this is all you need to reuse a parser without issues. all the other vars get reset on parse. expr = parser.parseString(code, cl.join("/") + "." + hxExt); + } } catch(e:Error) { _errorHandler(e); } catch(e) {