diff --git a/.github/workflows/superlinter.yml b/.github/workflows/superlinter.yml new file mode 100644 index 000000000..7c11dc827 --- /dev/null +++ b/.github/workflows/superlinter.yml @@ -0,0 +1,25 @@ +name: Super-Linter + +# Run this workflow every time a new commit pushed to your repository +on: push + +jobs: + # Set the job key. The key is displayed as the job name + # when a job name is not provided + super-lint: + # Name the Job + name: Lint code base + # Set the type of machine to run on + runs-on: ubuntu-latest + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout code + uses: actions/checkout@v2 + + # Runs the Super-Linter action + - name: Run Super-Linter + uses: github/super-linter@v3 + env: + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f28da89b9..2f39c89b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [UNRELEASED] +### Fixed +- When pausing music at the start, it doesn't continue the song anyways. ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) +- IDK i think backing out of song menu should play main menu songs again hehe ([shoutouts gedehari for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/48)) ## [0.2.4] - 2020-12-11 ### Added diff --git a/Project.xml b/Project.xml index b150255b9..21ed84198 100644 --- a/Project.xml +++ b/Project.xml @@ -2,7 +2,7 @@ - + diff --git a/source/PlayState.hx b/source/PlayState.hx index 90f453be4..1a58bc483 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -627,10 +627,7 @@ class PlayState extends MusicBeatState { if (FlxG.sound.music != null && !startingSong) { - FlxG.sound.music.play(); - Conductor.songPosition = FlxG.sound.music.time; - vocals.time = Conductor.songPosition; - vocals.play(); + resyncVocals(); } if (!startTimer.finished) @@ -641,6 +638,16 @@ class PlayState extends MusicBeatState super.closeSubState(); } + function resyncVocals():Void + { + vocals.pause(); + + FlxG.sound.music.play(); + Conductor.songPosition = FlxG.sound.music.time; + vocals.time = Conductor.songPosition; + vocals.play(); + } + private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; @@ -800,7 +807,7 @@ class PlayState extends MusicBeatState switch (totalBeats) { case 128, 129, 130: - vocals.volume = 0; + vocals.volume = 0; // FlxG.sound.music.stop(); // curLevel = 'Fresh'; // FlxG.switchState(new PlayState()); @@ -1445,12 +1452,9 @@ class PlayState extends MusicBeatState { if (SONG.needsVoices) { - if (vocals.time > Conductor.songPosition + Conductor.stepCrochet - || vocals.time < Conductor.songPosition - Conductor.stepCrochet) + if (vocals.time > Conductor.songPosition + 20 || vocals.time < Conductor.songPosition - 20) { - vocals.pause(); - vocals.time = Conductor.songPosition; - vocals.play(); + resyncVocals(); } }