From db561adbc70e7d8cd8169d963435254fa96971e1 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Sep 2021 15:39:30 -0400 Subject: [PATCH] lit up charted, and lil cleanups --- source/ChartingState.hx | 12 ++++++++++++ source/FreeplayState.hx | 18 ++++++++++-------- source/PlayState.hx | 39 ++++++++++++++------------------------- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index d9d48bd5f..2565bfb3a 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -591,6 +591,18 @@ class ChartingState extends MusicBeatState FlxG.watch.addQuick('daBeat', curBeat); FlxG.watch.addQuick('daStep', curStep); + if (FlxG.mouse.pressedMiddle) + { + if (FlxG.sound.music.playing) + { + FlxG.sound.music.pause(); + vocals.pause(); + } + + FlxG.sound.music.time = getStrumTime(FlxG.mouse.y) + sectionStartTime(); + vocals.time = FlxG.sound.music.time; + } + if (FlxG.mouse.pressed) { if (FlxG.keys.pressed.ALT) diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 8bb266e29..a2275a969 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -366,14 +366,16 @@ class FreeplayState extends MusicBeatState var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty); - if (!Assets.exists(Paths.json(songs[curSelected].songName + '/' + poop))) - { - // defaults to normal if HARD / EASY doesn't exist - // does not account if NORMAL doesn't exist! - FlxG.log.warn("CURRENT DIFFICULTY IS NOT CHARTED, DEFAULTING TO NORMAL!"); - poop = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), 1); - curDifficulty = 1; - } + // does not work properly, always just accidentally sets it to normal anyways! + /* if (!Assets.exists(Paths.json(songs[curSelected].songName + '/' + poop))) + { + // defaults to normal if HARD / EASY doesn't exist + // does not account if NORMAL doesn't exist! + FlxG.log.warn("CURRENT DIFFICULTY IS NOT CHARTED, DEFAULTING TO NORMAL!"); + poop = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), 1); + curDifficulty = 1; + }*/ + PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase()); PlayState.isStoryMode = false; PlayState.storyDifficulty = curDifficulty; diff --git a/source/PlayState.hx b/source/PlayState.hx index 0e1f7fbd7..28c26d310 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -86,7 +86,7 @@ class PlayState extends MusicBeatState private var camHUD:FlxCamera; private var camGame:FlxCamera; - var dialogue:Array = ['blah blah blah', 'coolswag']; + var dialogue:Array; public static var seenCutscene:Bool = false; @@ -120,6 +120,9 @@ class PlayState extends MusicBeatState var songScore:Int = 0; var scoreTxt:FlxText; + // Dunno why its called doof lol, it's just the dialogue box + var doof:DialogueBox; + var grpNoteSplashes:FlxTypedGroup; public static var campaignScore:Int = 0; @@ -176,23 +179,6 @@ class PlayState extends MusicBeatState switch (SONG.song.toLowerCase()) { - case 'tutorial': - dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.']; - case 'bopeebo': - dialogue = [ - 'HEY!', - "You think you can just sing\nwith my daughter like that?", - "If you want to date her...", - "You're going to have to go \nthrough ME first!" - ]; - case 'fresh': - dialogue = ["Not too shabby boy.", ""]; - case 'dadbattle': - dialogue = [ - "gah you think you're hot stuff?", - "If you can beat me here...", - "Only then I will even CONSIDER letting you\ndate my daughter!" - ]; case 'senpai': dialogue = CoolUtil.coolTextFile(Paths.txt('senpai/senpaiDialogue')); case 'roses': @@ -670,11 +656,15 @@ class PlayState extends MusicBeatState add(foregroundSprites); - var doof:DialogueBox = new DialogueBox(false, dialogue); - // doof.x += 70; - // doof.y = FlxG.height * 0.5; - doof.scrollFactor.set(); - doof.finishThing = startCountdown; + if (dialogue != null) + { + doof = new DialogueBox(false, dialogue); + // doof.x += 70; + // doof.y = FlxG.height * 0.5; + doof.scrollFactor.set(); + doof.finishThing = startCountdown; + doof.cameras = [camHUD]; + } Conductor.songPosition = -5000; @@ -761,7 +751,6 @@ class PlayState extends MusicBeatState iconP1.cameras = [camHUD]; iconP2.cameras = [camHUD]; scoreTxt.cameras = [camHUD]; - doof.cameras = [camHUD]; // if (SONG.song == 'South') // FlxG.camera.alpha = 0.7; @@ -805,7 +794,7 @@ class PlayState extends MusicBeatState }); }); case 'senpai' | 'roses' | 'thorns': - schoolIntro(doof); + schoolIntro(doof); // doof is assumed to be non-null, lol! case 'ugh': ughIntro(); case 'stress':