diff --git a/.github/actions/setup-haxeshit/action.yml b/.github/actions/setup-haxeshit/action.yml index 21fab6fb2..bf81e0d6d 100644 --- a/.github/actions/setup-haxeshit/action.yml +++ b/.github/actions/setup-haxeshit/action.yml @@ -10,11 +10,19 @@ runs: run: | haxelib config shell: bash + - name: Restore/create existing haxelib cache for faster downloads + uses: actions/cache@v3 + id: cache-haxelib-windows + with: + # wha? + key: cache-haxelib-${{ runner.os }}-${{ hashFiles('**/hmm.json')}} + path: | + .haxelib/ - name: Installing Haxe lol run: | haxe -version haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git haxelib version haxelib --global install hmm - haxelib --global run hmm install --quiet + haxelib --global run hmm install shell: bash diff --git a/.github/workflows/build-shit.yml b/.github/workflows/build-shit.yml index 11cecd138..35d436b2c 100644 --- a/.github/workflows/build-shit.yml +++ b/.github/workflows/build-shit.yml @@ -2,7 +2,7 @@ name: build-upload on: workflow_dispatch: push: - + jobs: check_date: runs-on: ubuntu-latest @@ -27,6 +27,7 @@ jobs: - uses: ./.github/actions/setup-haxeshit - name: Build game? run: | + sudo apt-get install -y libx11-dev libxinerama-dev libxrandr-dev libgl1-mesa-dev libgl-dev libxi-dev libxext-dev libasound2-dev haxelib run lime build html5 -debug --times ls - uses: ./.github/actions/upload-itch @@ -43,18 +44,6 @@ jobs: actions: write steps: - uses: actions/checkout@v3 - - name: Restore existing build cache for faster compilation - uses: actions/cache/restore@v3 - id: cache-windows-shit - with: - # wha? - key: cache-build-win - path: | - .haxelib/ - export/debug/windows/haxe/ - export/debug/windows/obj/ - restore-keys: | - cache-build-windows - uses: ./.github/actions/setup-haxeshit - name: Build game run: | @@ -65,33 +54,3 @@ jobs: butler-key: ${{ secrets.BUTLER_API_KEY}} build-dir: export/debug/windows/bin target: win - - name: Clearing already existing cache - uses: actions/github-script@v6 - with: - script: | - const caches = await github.rest.actions.getActionsCacheList({ - owner: context.repo.owner, - repo: context.repo.repo, - }) - for (const cache of caches.data.actions_caches) { - if (cache.key == "cache-build-windows") { - console.log('Clearing ' + cache.key + '...') - await github.rest.actions.deleteActionsCacheById({ - owner: context.repo.owner, - repo: context.repo.repo, - cache_id: cache.id, - }) - console.log("Cache cleared.") - } - } - - name: Uploading new cache - uses: actions/cache/save@v3 - with: - # caching again since for some reason it doesnt work with the first post cache shit - key: cache-build-windows - path: | - .haxelib/ - export/debug/windows/haxe/ - export/debug/windows/obj/ - restore-keys: | - cache-build-windows diff --git a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx index aad9cd851..1c120a7c7 100644 --- a/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx +++ b/source/funkin/graphics/adobeanimate/FlxAtlasSprite.hx @@ -16,7 +16,7 @@ class FlxAtlasSprite extends FlxAnimate FrameRate: 24.0, Reversed: false, // ?OnComplete:Void -> Void, - ShowPivot: #if debug true #else false #end, + ShowPivot: #if debug false #else false #end, Antialiasing: true, ScrollFactor: new FlxPoint(1, 1), // Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset diff --git a/source/funkin/modding/base/ScriptedMusicBeatSubstate.hx b/source/funkin/modding/base/ScriptedMusicBeatSubstate.hx deleted file mode 100644 index 7dab3d7dd..000000000 --- a/source/funkin/modding/base/ScriptedMusicBeatSubstate.hx +++ /dev/null @@ -1,8 +0,0 @@ -package funkin.modding.base; - -/** - * A script that can be tied to a MusicBeatSubState. - * Create a scripted class that extends MusicBeatSubState to use this. - */ -@:hscriptClass -class ScriptedMusicBeatSubState extends funkin.MusicBeatSubState implements HScriptedClass {} diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index 140a4fbc8..7c39cef56 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -1,5 +1,6 @@ package funkin.play; +import flixel.FlxG; import flixel.FlxObject; import flixel.FlxSprite; import flixel.system.FlxSound; @@ -97,7 +98,6 @@ class GameOverSubState extends MusicBeatSubState boyfriend.isDead = true; add(boyfriend); boyfriend.resetCharacter(); - boyfriend.playAnimation('firstDeath', true, true); // Assign a camera follow point to the boyfriend's position. cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1); @@ -118,15 +118,30 @@ class GameOverSubState extends MusicBeatSubState // The conductor now represents the BPM of the game over music. Conductor.songPosition = 0; - - // Play the "blue balled" sound. May play a variant if one has been assigned. - playBlueBalledSFX(); } + var hasStartedAnimation:Bool = false; + override function update(elapsed:Float) { super.update(elapsed); + if (!hasStartedAnimation) + { + hasStartedAnimation = true; + + if (boyfriend.hasAnimation('fakeoutDeath') && FlxG.random.bool((1 / 4096) * 100)) + { + boyfriend.playAnimation('fakeoutDeath', true, true); + } + else + { + boyfriend.playAnimation('firstDeath', true, true); + // Play the "blue balled" sound. May play a variant if one has been assigned. + playBlueBalledSFX(); + } + } + // // Handle user inputs. // @@ -145,14 +160,18 @@ class GameOverSubState extends MusicBeatSubState } // KEYBOARD ONLY: Restart the level when pressing the assigned key. - if (controls.ACCEPT) + if (controls.ACCEPT && blueballed) { + blueballed = false; confirmDeath(); } // KEYBOARD ONLY: Return to the menu when pressing the assigned key. if (controls.BACK) { + blueballed = false; + PlayState.instance.deathCounter = 0; + // PlayState.seenCutscene = false; // old thing... gameOverMusic.stop(); if (PlayStatePlaylist.isStoryMode) FlxG.switchState(new StoryMenuState()); @@ -252,12 +271,15 @@ class GameOverSubState extends MusicBeatSubState } } + static var blueballed:Bool = false; + /** * Play the sound effect that occurs when * boyfriend's testicles get utterly annihilated. */ - function playBlueBalledSFX() + public static function playBlueBalledSFX() { + blueballed = true; FlxG.sound.play(Paths.sound('fnf_loss_sfx' + blueBallSuffix)); } diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 3ea278f46..e8cfb1402 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1,5 +1,6 @@ package funkin.play; +import flixel.sound.FlxSound; import funkin.ui.story.StoryMenuState; import flixel.addons.display.FlxPieDial; import flixel.addons.transition.FlxTransitionableState; @@ -867,6 +868,7 @@ class PlayState extends MusicBeatState FlxG.sound.music.onComplete = endSong; trace('Playing vocals...'); + add(vocals); vocals.play(); #if discord_rpc