diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0f3f1efd..4f1084dc 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 449f82c6..c11a793f 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: diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index e67b59ba..7135b90e 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -598,17 +598,24 @@ 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 (@:privateAccess vocals._sound != null) //for some reason Assets.exists returns true regardless if the file actually exists + 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 });