From 24b3003f7395c621a1d9886b5c42ff9eb479798c Mon Sep 17 00:00:00 2001 From: Spel0 <75626813+Spel0@users.noreply.github.com> Date: Sun, 8 Aug 2021 05:56:05 +0300 Subject: [PATCH 1/3] strums --- source/PlayState.hx | 61 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index e5e55c0..d0dce51 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3192,6 +3192,17 @@ class PlayState extends MusicBeatState spr.centerOffsets(); } }); + if (PlayStateChangeables.botPlay) + { + playerStrums.forEach(function(spr:FlxSprite) + { + if (spr.animation.finished) + { + spr.animation.play('static'); + spr.centerOffsets(); + } + }); + } } if (!inCutscene && songStarted) @@ -3857,6 +3868,25 @@ class PlayState extends MusicBeatState { goodNoteHit(daNote); boyfriend.holdTimer = daNote.sustainLength; + if (FlxG.save.data.cpuStrums) + { + playerStrums.forEach(function(spr:FlxSprite) + { + trace(Math.abs(daNote.noteData)); + if (Math.abs(daNote.noteData) == spr.ID) + { + spr.animation.play('confirm', true); + } + if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) + { + spr.centerOffsets(); + spr.offset.x -= 13; + spr.offset.y -= 13; + } + else + spr.centerOffsets(); + }); + } } } } @@ -3868,22 +3898,25 @@ class PlayState extends MusicBeatState boyfriend.playAnim('idle'); } - playerStrums.forEach(function(spr:FlxSprite) + if (!PlayStateChangeables.botPlay) { - if (keys[spr.ID] && spr.animation.curAnim.name != 'confirm') - spr.animation.play('pressed', false); - if (!keys[spr.ID]) - spr.animation.play('static', false); - - if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) + playerStrums.forEach(function(spr:FlxSprite) { - spr.centerOffsets(); - spr.offset.x -= 13; - spr.offset.y -= 13; - } - else - spr.centerOffsets(); - }); + if (keys[spr.ID] && spr.animation.curAnim.name != 'confirm') + spr.animation.play('pressed', false); + if (!keys[spr.ID]) + spr.animation.play('static', false); + + if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) + { + spr.centerOffsets(); + spr.offset.x -= 13; + spr.offset.y -= 13; + } + else + spr.centerOffsets(); + }); + } } public function findByTime(time:Float):Array From ad2b55471e6f2f9ec46c15ec41adea98d944fe2a Mon Sep 17 00:00:00 2001 From: Spel0 <75626813+Spel0@users.noreply.github.com> Date: Sun, 8 Aug 2021 06:22:14 +0300 Subject: [PATCH 2/3] why is it even --- source/PlayState.hx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index ad01f6b..17fd3ac 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -194,7 +194,7 @@ class PlayState extends MusicBeatState var notesHitArray:Array = []; var currentFrames:Int = 0; - var idleToBeat:Bool = true; // change if bf and dad would idle to the beat of the song + var idleToBeat:Bool = false; // change if bf and dad would idle to the beat of the song var idleBeat:Int = 4; // how frequently bf and dad would play their idle animation(1 - every beat, 2 - every 2 beats and so on) public var dialogue:Array = ['dad:blah blah blah', 'bf:coolswag']; @@ -3943,7 +3943,6 @@ class PlayState extends MusicBeatState { playerStrums.forEach(function(spr:FlxSprite) { - trace(Math.abs(daNote.noteData)); if (Math.abs(daNote.noteData) == spr.ID) { spr.animation.play('confirm', true); From 54b8858606796b15b46900a0f7b5c22c7b13daf0 Mon Sep 17 00:00:00 2001 From: Spel0 <75626813+Spel0@users.noreply.github.com> Date: Sun, 8 Aug 2021 06:37:15 +0300 Subject: [PATCH 3/3] lamo --- source/ResultsScreen.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ResultsScreen.hx b/source/ResultsScreen.hx index c066041..5e39fce 100644 --- a/source/ResultsScreen.hx +++ b/source/ResultsScreen.hx @@ -88,7 +88,7 @@ class ResultsScreen extends FlxSubState var bads = PlayState.isStoryMode ? PlayState.campaignBads : PlayState.bads; var shits = PlayState.isStoryMode ? PlayState.campaignShits : PlayState.shits; - comboText = new FlxText(20,-75,0,'Judgements:\nSicks - ${PlayState.sicks}\nGoods - ${sicks}\nBads - ${bads}\n\nCombo Breaks: ${(PlayState.isStoryMode ? PlayState.campaignMisses : PlayState.misses)}\nHighest Combo: ${PlayState.highestCombo + 1}\nScore: ${PlayState.instance.songScore}\nAccuracy: ${HelperFunctions.truncateFloat(PlayState.instance.accuracy,2)}%\n\n${Ratings.GenerateLetterRank(PlayState.instance.accuracy)}\n\n${!PlayState.loadRep ? "F1 - View replay\nF2 - Replay song" : ""} + comboText = new FlxText(20,-75,0,'Judgements:\nSicks - ${sicks}\nGoods - ${goods}\nBads - ${bads}\n\nCombo Breaks: ${(PlayState.isStoryMode ? PlayState.campaignMisses : PlayState.misses)}\nHighest Combo: ${PlayState.highestCombo + 1}\nScore: ${PlayState.instance.songScore}\nAccuracy: ${HelperFunctions.truncateFloat(PlayState.instance.accuracy,2)}%\n\n${Ratings.GenerateLetterRank(PlayState.instance.accuracy)}\n\n${!PlayState.loadRep ? "F1 - View replay\nF2 - Replay song" : ""} '); comboText.size = 28; comboText.setBorderStyle(FlxTextBorderStyle.OUTLINE,FlxColor.BLACK,4,1);