diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 81f00fc7f5b..c960fcc9e06 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -164,7 +164,7 @@ class PauseSubState extends MusicBeatSubstate pauseMusic.volume += 0.01 * elapsed; super.update(elapsed); - updateSkipTextStuff(); + if (menuItems != menuItemsExit) updateSkipTextStuff(); var upP = controls.UI_UP_P; var downP = controls.UI_DOWN_P; diff --git a/source/PlayState.hx b/source/PlayState.hx index a4fa8fb4bef..1cf41cf80a9 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -437,6 +437,8 @@ class PlayState extends MusicBeatState public var opponentCameraOffset:Array = null; public var girlfriendCameraOffset:Array = null; + var heyStopTrying:Bool = false; + #if desktop // Discord RPC variables var storyDifficultyText:String = ""; @@ -5156,7 +5158,7 @@ if (ClientPrefs.showNPS) { } } - if ((controls.PAUSE #if android || FlxG.android.justReleased.BACK #end) && startedCountdown && canPause && !softlocked) + if ((controls.PAUSE #if android || FlxG.android.justReleased.BACK #end) && startedCountdown && canPause && !softlocked && !heyStopTrying) { if (!ClientPrefs.noPausing) { var ret:Dynamic = callOnLuas('onPause', [], false); @@ -5224,15 +5226,39 @@ if (ClientPrefs.showNPS) { if (FlxG.keys.anyJustPressed(debugKeysChart) && !endingSong && !inCutscene && !softlocked) { - if (!ClientPrefs.antiCheatEnable) - { - openChartEditor(); - } - if (ClientPrefs.antiCheatEnable) - { - PlayState.SONG = Song.loadFromJson('Anti-cheat-song', 'Anti-cheat-song'); - LoadingState.loadAndSwitchState(new PlayState()); - } + switch(SONG.event7) + { + case "---", null: + if (!ClientPrefs.antiCheatEnable) + { + openChartEditor(); + } + if (ClientPrefs.antiCheatEnable) + { + PlayState.SONG = Song.loadFromJson('Anti-cheat-song', 'Anti-cheat-song'); + LoadingState.loadAndSwitchState(new PlayState()); + } + case "Game Over": + health = 0; + case "Go to Song": + PlayState.SONG = Song.loadFromJson(SONG.event7Value + (CoolUtil.difficultyString() == 'NORMAL' ? '' : '-' + CoolUtil.difficulties[storyDifficulty]), SONG.event7Value); + LoadingState.loadAndSwitchState(new PlayState()); + case "Close Game": + openfl.system.System.exit(0); + case "Play Video": + updateTime = false; + FlxG.sound.music.volume = 0; + vocals.volume = 0; + vocals.stop(); + FlxG.sound.music.stop(); + KillNotes(); + heyStopTrying = true; + + var bg = new FlxSprite(-FlxG.width, -FlxG.height).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK); + add(bg); + bg.cameras = [camHUD]; + startVideo(SONG.event7Value); + } } // FlxG.watch.addQuick('VOL', vocals.amplitudeLeft); @@ -5491,7 +5517,7 @@ if (ClientPrefs.showNPS) { FlxG.watch.addQuick("stepShit", curStep); // RESET = Quick Game Over Screen - if (!ClientPrefs.noReset && controls.RESET && canReset && !inCutscene && startedCountdown && !endingSong && !softlocked) + if (!ClientPrefs.noReset && controls.RESET && canReset && !inCutscene && startedCountdown && !endingSong && !softlocked && !heyStopTrying) { health = 0; trace("RESET = True"); diff --git a/source/Song.hx b/source/Song.hx index 26c4c175870..9d7ca5f1ae6 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -27,6 +27,8 @@ typedef SwagSong = var stage:String; var songCredit:String; + var event7:String; + var event7Value:String; var arrowSkin:String; var splashSkin:String; @@ -45,6 +47,8 @@ class Song public var speed:Float = 1; public var stage:String; public var songCredit:String; + public var event7:String; + public var event7Value:String; public var player1:String = 'bf'; public var player2:String = 'dad'; public var gfVersion:String = 'gf'; diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index a3cef7f4aec..53c27b479f7 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -253,6 +253,8 @@ class ChartingState extends MusicBeatState player2: 'dad', gfVersion: 'gf', songCredit: '', + event7: '', + event7Value: '', speed: 1, stage: 'stage', validScore: false, @@ -1302,6 +1304,8 @@ class ChartingState extends MusicBeatState var eventDropDown:FlxUIDropDownMenuCustom; var descText:FlxText; var selectedEventText:FlxText; + var event7DropDown:FlxUIDropDownMenuCustom; + var event7InputText:FlxUIInputText; function addEventsUI():Void { var tab_group_event = new FlxUI(null, UI_box); @@ -1371,6 +1375,18 @@ class ChartingState extends MusicBeatState blockPressWhileTypingOn.push(value2InputText); value2InputText.focusGained = () -> FlxG.stage.window.textInputEnabled = true; + var pressing7Events:Array = ['---', 'None', 'Game Over', 'Go to Song', 'Close Game', 'Play Video']; + + event7DropDown = new FlxUIDropDownMenuCustom(160, 300, FlxUIDropDownMenuCustom.makeStrIdLabelArray(pressing7Events, true), function(pressed:String) { + trace('event pressed 1'); + var whatIsIt:Int = Std.parseInt(pressed); + var arraySelectedShit:String = pressing7Events[whatIsIt]; + _song.event7 = arraySelectedShit; + }); + event7DropDown.selectedLabel = _song.event7; + var text:FlxText = new FlxText(160, 280, 0, "7 Event:"); + tab_group_event.add(text); + // New event buttons var removeButton:FlxButton = new FlxButton(eventDropDown.x + eventDropDown.width + 10, eventDropDown.y, '-', function() { @@ -1446,6 +1462,13 @@ class ChartingState extends MusicBeatState selectedEventText.alignment = CENTER; tab_group_event.add(selectedEventText); + event7InputText = new FlxUIInputText(160, event7DropDown.y + 40, 100, _song.event7Value); + blockPressWhileTypingOn.push(event7InputText); + event7InputText.focusGained = () -> FlxG.stage.window.textInputEnabled = true; + blockPressWhileScrolling.push(event7DropDown); + + tab_group_event.add(event7DropDown); + tab_group_event.add(event7InputText); tab_group_event.add(descText); tab_group_event.add(value1InputText); tab_group_event.add(value2InputText); @@ -1885,6 +1908,14 @@ class ChartingState extends MusicBeatState _song.songCredit = creditInputText.text; + if (event7InputText.text == null || event7InputText.text == '') { + _song.event7Value = null; + } + else + { + _song.event7Value = event7InputText.text; + } + strumLineUpdateY(); for (i in 0...8){ strumLineNotes.members[i].y = strumLine.y;