mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-04-22 03:34:10 -04:00
Merge pull request #434 from FunkinCrew/bugfix/combo-fixes
Bugfix/combo fixes cancel builds if there's a new one queued get list of current runs on current-branch push test comment out if merge wrap in string actions permissions log more log cancel runs test write permission uncomment pr merge check remove push lol
This commit is contained in:
commit
be69a10b86
3 changed files with 52 additions and 7 deletions
4
.github/workflows/build-shit.yml
vendored
4
.github/workflows/build-shit.yml
vendored
|
@ -3,6 +3,10 @@ on:
|
|||
workflow_dispatch:
|
||||
push:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
create-nightly-html5:
|
||||
runs-on: [self-hosted, linux]
|
||||
|
|
34
.github/workflows/cancel-merged-branches.yml
vendored
Normal file
34
.github/workflows/cancel-merged-branches.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: cancel-merged-branches
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
cancel_stuff:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
id: cancel-runs
|
||||
with:
|
||||
result-encoding: string
|
||||
retries: 3
|
||||
script: |
|
||||
let branch_workflows = await github.rest.actions.listWorkflowRuns({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: "build-shit.yml",
|
||||
status: "queued",
|
||||
branch: "${{ github.ref_name }}"
|
||||
});
|
||||
let runs = branch_workflows.data.workflow_runs;
|
||||
runs.forEach((run) => {
|
||||
github.rest.actions.cancelWorkflowRun({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: run.id
|
||||
});
|
||||
});
|
|
@ -2441,7 +2441,8 @@ class PlayState extends MusicBeatSubState
|
|||
if (Highscore.tallies.combo != 0)
|
||||
{
|
||||
// Break the combo.
|
||||
Highscore.tallies.combo = comboPopUps.displayCombo(0);
|
||||
if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0);
|
||||
Highscore.tallies.combo = 0;
|
||||
}
|
||||
|
||||
if (playSound)
|
||||
|
@ -2568,32 +2569,38 @@ class PlayState extends MusicBeatSubState
|
|||
*/
|
||||
function popUpScore(daNote:NoteSprite, score:Int, daRating:String, healthChange:Float):Void
|
||||
{
|
||||
vocals.playerVolume = 1;
|
||||
|
||||
if (daRating == 'miss')
|
||||
{
|
||||
// If daRating is 'miss', that means we made a mistake and should not continue.
|
||||
trace('[WARNING] popUpScore judged a note as a miss!');
|
||||
FlxG.log.warn('popUpScore judged a note as a miss!');
|
||||
// TODO: Remove this.
|
||||
comboPopUps.displayRating('miss');
|
||||
return;
|
||||
}
|
||||
|
||||
vocals.playerVolume = 1;
|
||||
|
||||
var isComboBreak = false;
|
||||
switch (daRating)
|
||||
{
|
||||
case 'sick':
|
||||
Highscore.tallies.sick += 1;
|
||||
Highscore.tallies.totalNotesHit++;
|
||||
isComboBreak = Constants.JUDGEMENT_SICK_COMBO_BREAK;
|
||||
case 'good':
|
||||
Highscore.tallies.good += 1;
|
||||
Highscore.tallies.totalNotesHit++;
|
||||
isComboBreak = Constants.JUDGEMENT_GOOD_COMBO_BREAK;
|
||||
case 'bad':
|
||||
Highscore.tallies.bad += 1;
|
||||
Highscore.tallies.totalNotesHit++;
|
||||
isComboBreak = Constants.JUDGEMENT_BAD_COMBO_BREAK;
|
||||
case 'shit':
|
||||
Highscore.tallies.shit += 1;
|
||||
Highscore.tallies.totalNotesHit++;
|
||||
isComboBreak = Constants.JUDGEMENT_SHIT_COMBO_BREAK;
|
||||
default:
|
||||
FlxG.log.error('Wuh? Buh? Guh? Note hit judgement was $daRating!');
|
||||
}
|
||||
|
||||
health += healthChange;
|
||||
|
@ -2601,18 +2608,18 @@ class PlayState extends MusicBeatSubState
|
|||
if (isComboBreak)
|
||||
{
|
||||
// Break the combo, but don't increment tallies.misses.
|
||||
Highscore.tallies.combo = comboPopUps.displayCombo(0);
|
||||
if (Highscore.tallies.combo >= 10) comboPopUps.displayCombo(0);
|
||||
Highscore.tallies.combo = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Highscore.tallies.combo++;
|
||||
Highscore.tallies.totalNotesHit++;
|
||||
if (Highscore.tallies.combo > Highscore.tallies.maxCombo) Highscore.tallies.maxCombo = Highscore.tallies.combo;
|
||||
}
|
||||
|
||||
playerStrumline.hitNote(daNote, !isComboBreak);
|
||||
|
||||
if (daRating == "sick")
|
||||
if (daRating == 'sick')
|
||||
{
|
||||
playerStrumline.playNoteSplash(daNote.noteData.getDirection());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue