From 931aca84927aa25d033221984eddf9ab47d724a6 Mon Sep 17 00:00:00 2001
From: BuildTools <unconfigured@null.spigotmc.org>
Date: Thu, 26 Nov 2020 19:43:45 +0100
Subject: [PATCH] fixed spamming issue with the buttons on the story menu

---
 source/StoryMenuState.hx | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx
index 1bdfa866e..c87d8e028 100644
--- a/source/StoryMenuState.hx
+++ b/source/StoryMenuState.hx
@@ -230,15 +230,23 @@ class StoryMenuState extends MusicBeatState
 
 	var movedBack:Bool = false;
 	var selectedWeek:Bool = false;
-
+	var stopspamming = false;
 	function selectWeek()
 	{
 		if (weekUnlocked[curWeek])
 		{
-			FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
+			if (stopspamming == true) 
+			{
+				// no more spamming for u hahaha
+			}
+			if (stopspamming == false) 
+			{
+				FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
 
-			grpWeekText.members[curWeek].week.animation.resume();
-			grpWeekCharacters.members[1].animation.play('bfConfirm');
+				grpWeekText.members[curWeek].week.animation.resume();
+				grpWeekCharacters.members[1].animation.play('bfConfirm');
+				stopspamming = true;
+			}
 
 			PlayState.storyPlaylist = weekData[curWeek];
 			PlayState.isStoryMode = true;