From 6d575707afb3bd56c44d1d02be2a8a7a6213a61c Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Tue, 27 Sep 2022 19:48:08 +0200 Subject: [PATCH 1/6] Adding the 2 new options --- source/PlayState.hx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 46105848..d7700b7b 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -4762,8 +4762,8 @@ class PlayState extends MusicBeatState //Dupe note remove notes.forEachAlive(function(note:Note) { if (daNote != note - && daNote.mustPress - && daNote.noteData == note.noteData + && daNote.mustPress + && daNote.noteData == note.noteData && daNote.isSustainNote == note.isSustainNote && Math.abs(daNote.strumTime - note.strumTime) < 1) { @@ -4913,6 +4913,7 @@ class PlayState extends MusicBeatState if(note.isSustainNote && !note.animation.curAnim.name.endsWith('end') && note.animation.curAnim != null) { time += 0.15; } + StrumPlayAnim(true, Std.int(Math.abs(note.noteData)), time); note.hitByOpponent = true; @@ -5071,7 +5072,7 @@ class PlayState extends MusicBeatState StrumPlayAnim(false, Std.int(Math.abs(note.noteData)), time); } else { var spr = playerStrums.members[note.noteData]; - if(spr != null) + if(spr != null && ClientPrefs.lightPlayerStrum) { spr.playAnim('confirm', true); } @@ -5563,12 +5564,15 @@ class PlayState extends MusicBeatState function StrumPlayAnim(isDad:Bool, id:Int, time:Float) { var spr:StrumNote = null; - if(isDad) + var light:Bool = true; + if(isDad && ClientPrefs.lightCpuStrum) spr = strumLineNotes.members[id]; - else + else if(ClientPrefs.lightPlayerStrum) spr = playerStrums.members[id]; + else + light = false - if(spr != null) { + if(spr != null && !light) { spr.playAnim('confirm', true); spr.resetAnim = time; } From d371a844fd88bbce40740fa58e93918d46f4d3ff Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Tue, 27 Sep 2022 19:51:39 +0200 Subject: [PATCH 2/6] Update ClientPrefs.hx --- source/ClientPrefs.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/ClientPrefs.hx b/source/ClientPrefs.hx index 45299e53..402dc45e 100644 --- a/source/ClientPrefs.hx +++ b/source/ClientPrefs.hx @@ -47,6 +47,8 @@ class ClientPrefs //public static var multiplicativeValue:Float = 0; public static var musicSelected:String = 'freakyMenu'; public static var autoPause:Bool = false; + public static var lightCpuStrum:Bool = true; + public static var lightPlayerStrum:Bool = true; public static var gameplaySettings:Map = [ 'scrollspeed' => 1.0, 'scrolltype' => 'multiplicative', @@ -120,6 +122,8 @@ class ClientPrefs public static function saveSettings() { + FlxG.save.data.lightCpuStrum = lightCpuStrum; + FlxG.save.data.lightPlayerStrum = lightPlayerStrum; FlxG.save.data.noteSkin = noteSkin; FlxG.save.data.winningIcon = winningIcon; //FlxG.save.data.multiplicativeValue = multiplicativeValue; @@ -182,6 +186,8 @@ class ClientPrefs public static function loadPrefs() { + if(FlxG.save.data.lightCpuStrum != null) lightCpuStrum = FlxG.save.data.lightCpuStrum; + if(FlxG.save.data.lightPlayerStrum != null) lightPlayerStrum = FlxG.save.data.lightPlayerStrum; if(FlxG.save.data.noteSkin != null) { noteSkin = FlxG.save.data.noteSkin; From 4ce1cb75171b52247ce2632e26964029adee483e Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Tue, 27 Sep 2022 19:55:58 +0200 Subject: [PATCH 3/6] Finished --- source/options/GameplaySettingsSubState.hx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/options/GameplaySettingsSubState.hx b/source/options/GameplaySettingsSubState.hx index c78e03b3..865410ba 100644 --- a/source/options/GameplaySettingsSubState.hx +++ b/source/options/GameplaySettingsSubState.hx @@ -88,6 +88,20 @@ class GameplaySettingsSubState extends BaseOptionsMenu false); addOption(option); + var option:Option = new Option('Light Player Strum', + "If unchecked, your strum will not light when pressing\na note.", + 'lightPlayerStrum', + 'bool', + true); + addOption(option); + + var option:Option = new Option('Light Opponent Strum', + "If unchecked, the opponent strum will not light when pressing\na note.", + 'lightCpuStrum', + 'bool', + true); + addOption(option); + var option:Option = new Option('Hide Opponent Notes', 'If checked, opponent notes get hidden.', 'opponentStrums', From fa5e6668d7a2685cdd4df55f532c79624ec153e6 Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Tue, 27 Sep 2022 20:06:05 +0200 Subject: [PATCH 4/6] Im starting to get very mad --- source/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index d7700b7b..62fd72a0 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -5570,7 +5570,7 @@ class PlayState extends MusicBeatState else if(ClientPrefs.lightPlayerStrum) spr = playerStrums.members[id]; else - light = false + light = false; if(spr != null && !light) { spr.playAnim('confirm', true); From 03637a7f79e3a004c0060ce81ee7e53ae447b33a Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Sat, 1 Oct 2022 09:32:45 +0200 Subject: [PATCH 5/6] Update PlayState.hx --- source/PlayState.hx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 62fd72a0..cadb048c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -5565,14 +5565,20 @@ class PlayState extends MusicBeatState function StrumPlayAnim(isDad:Bool, id:Int, time:Float) { var spr:StrumNote = null; var light:Bool = true; - if(isDad && ClientPrefs.lightCpuStrum) - spr = strumLineNotes.members[id]; - else if(ClientPrefs.lightPlayerStrum) - spr = playerStrums.members[id]; - else - light = false; + if(isDad) { + if(ClientPrefs.lightCpuStrum) + spr = strumLineNotes.members[id]; + else + light = false + } + else { + if(ClientPrefs.lightPlayerStrum) + spr = playerStrums.members[id]; + else + light = false; + } - if(spr != null && !light) { + if(spr != null && light) { spr.playAnim('confirm', true); spr.resetAnim = time; } From 4a816185e192aa9d749e0386e567139bb0f40f98 Mon Sep 17 00:00:00 2001 From: Wither362 <93864752+Wither362@users.noreply.github.com> Date: Sun, 2 Oct 2022 10:55:57 +0200 Subject: [PATCH 6/6] Update PlayState.hx --- source/PlayState.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index cadb048c..720a9acd 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -5563,19 +5563,21 @@ class PlayState extends MusicBeatState } function StrumPlayAnim(isDad:Bool, id:Int, time:Float) { + if(!ClientPrefs.lightCpuStrum && !ClientPrefs.lightPlayerStrum) return; + var spr:StrumNote = null; var light:Bool = true; if(isDad) { if(ClientPrefs.lightCpuStrum) spr = strumLineNotes.members[id]; else - light = false + return; } else { if(ClientPrefs.lightPlayerStrum) spr = playerStrums.members[id]; else - light = false; + return; } if(spr != null && light) {