From d4a7d7eac4dec7361aa778d97b6a2771c7b92295 Mon Sep 17 00:00:00 2001 From: Hyper_ <40342021+NotHyper-474@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:48:58 -0300 Subject: [PATCH 1/3] [Unix Build Actions] Do not preserve directory tree when packing tar (#334) * Update linux.yml Now it won't preserve the directory tree (i.e it won't include the "export/release/linux/bin" folders) * do the same for macos --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8ac80b6a..4e742b35 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,7 +36,7 @@ jobs: run: | haxelib run lime build linux - name: Tar files - run: tar -zcvf CodenameEngine.tar.gz export/release/linux/bin + run: tar -zcvf CodenameEngine.tar.gz -C export/release/linux/bin . - name: Uploading artifact (entire build) uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 819a3af0..3dd28814 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,7 +33,7 @@ jobs: run: | haxelib run lime build mac - name: Tar files - run: tar -zcvf CodenameEngine.tar.gz export/release/macos/bin + run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin . - name: Uploading artifact (entire build) uses: actions/upload-artifact@v2 with: From 64923a3e07317fc36db9e539b546c72d64275653 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 26 Jul 2024 04:42:06 +0200 Subject: [PATCH 2/3] Istfg why didnt we fix this months ago --- source/funkin/editors/charter/Charter.hx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 1071763a..9e03c5a6 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -607,20 +607,29 @@ class Charter extends UIState { updateWaveforms(); } + inline function isSoundLoaded(sound:FlxSound) { + @:privateAccess + return sound != null && sound._sound != null && sound._sound.length > 0; + } + public function updateWaveforms() { - var wavesToGenerate:Array<{name:String, sound:FlxSound}> = [ - {name: "Inst.ogg", sound: FlxG.sound.music}, - ]; - if (PlayState.SONG.meta.needsVoices != false) + var wavesToGenerate:Array<{name:String, sound:FlxSound}> = []; + + if(isSoundLoaded(FlxG.sound.music)) + wavesToGenerate.push({name: "Inst.ogg", sound: FlxG.sound.music}); + + if (PlayState.SONG.meta.needsVoices != false && isSoundLoaded(vocals)) wavesToGenerate.push({name: "Voices.ogg", sound: vocals}); for (strumLine in strumLines) - if (strumLine.vocals != null && strumLine.strumLine.vocalsSuffix != null && strumLine.strumLine.vocalsSuffix != "") + if (strumLine.vocals != null && strumLine.strumLine.vocalsSuffix != null && strumLine.strumLine.vocalsSuffix != "" && isSoundLoaded(strumLine.vocals)) wavesToGenerate.push({ - name: 'Voices${strumLine.strumLine.vocalsSuffix}.ogg', + name: 'Voices${strumLine.strumLine.vocalsSuffix}.ogg', sound: strumLine.vocals }); + trace(wavesToGenerate, @:privateAccess vocals._sound, @:privateAccess vocals._sound?.length); + var oldWaveformList:Array = waveformHandler.waveformList; var newWaveformList:Array = [for (data in wavesToGenerate) data.name]; From 42cbb45360821283ba18d68d386712ca50c9bc4c Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 26 Jul 2024 04:44:18 +0200 Subject: [PATCH 3/3] Ooops --- source/funkin/editors/charter/Charter.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 9e03c5a6..2ff39aa0 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -628,8 +628,6 @@ class Charter extends UIState { sound: strumLine.vocals }); - trace(wavesToGenerate, @:privateAccess vocals._sound, @:privateAccess vocals._sound?.length); - var oldWaveformList:Array = waveformHandler.waveformList; var newWaveformList:Array = [for (data in wavesToGenerate) data.name];