diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index 9ab281d..34528b2 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -65,6 +65,9 @@ class KadeEngineData if (FlxG.save.data.flashing == null) FlxG.save.data.flashing = true; + + if (FlxG.save.data.resetButton == null) + FlxG.save.data.resetButton = false; if (FlxG.save.data.botplay == null) FlxG.save.data.botplay = false; diff --git a/source/Options.hx b/source/Options.hx index 2e4cae4..cb39f74 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -204,6 +204,26 @@ class DistractionsAndEffectsOption extends Option } } +class ResetButtonOption extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + public override function press():Bool + { + FlxG.save.data.resetButton = !FlxG.save.data.resetButton; + display = updateDisplay(); + return true; + } + + private override function updateDisplay():String + { + return "Reset Button " + (!FlxG.save.data.resetButton ? "off" : "on"); + } +} + class FlashingLightsOption extends Option { public function new(desc:String) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 0f3239f..3142805 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -30,6 +30,7 @@ class OptionsMenu extends MusicBeatState #end new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If it's at 1, it will be chart dependent)"), new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"), + new ResetButtonOption("Toggle pressing R to gameover."), // new OffsetMenu("Get a note offset based off of your inputs!"), new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference") ]), @@ -51,7 +52,7 @@ class OptionsMenu extends MusicBeatState new ReplayOption("View replays"), #end new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain."), - new WatermarkOption("Turn off all watermarks from the engine."), + new WatermarkOption("Enable and disable all watermarks from the engine."), new BotPlay("Showcase your charts and mods with autoplay.") ]) diff --git a/source/PlayState.hx b/source/PlayState.hx index 9058186..fdb8654 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1,5 +1,6 @@ package; +import flixel.input.keyboard.FlxKey; import haxe.Exception; import openfl.geom.Matrix; import openfl.display.BitmapData; @@ -307,8 +308,6 @@ class PlayState extends MusicBeatState trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay); - - //dialogue shit switch (SONG.song.toLowerCase()) { @@ -726,8 +725,6 @@ class PlayState extends MusicBeatState gfVersion = 'gf-christmas'; case 'gf-pixel': gfVersion = 'gf-pixel'; - case 'gf': - gfVersion = 'gf'; default: gfVersion = 'gf'; } @@ -1788,7 +1785,7 @@ class PlayState extends MusicBeatState // 1 / 1000 chance for Gitaroo Man easter egg if (FlxG.random.bool(0.1)) { - // gitaroo man easter egg + trace('GITAROO MAN EASTER EGG'); FlxG.switchState(new GitarooPause()); } else @@ -1852,7 +1849,19 @@ class PlayState extends MusicBeatState } #end } - + + if (FlxG.keys.justPressed.ZERO) + { + FlxG.switchState(new AnimationDebug(SONG.player1)); + #if windows + if (luaModchart != null) + { + luaModchart.die(); + luaModchart = null; + } + #end + } + #end if (startingSong) @@ -2122,6 +2131,29 @@ class PlayState extends MusicBeatState // FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); } + if (FlxG.save.data.resetButton) + { + if(FlxG.keys.justPressed.R) + { + boyfriend.stunned = true; + + persistentUpdate = false; + persistentDraw = false; + paused = true; + + vocals.stop(); + FlxG.sound.music.stop(); + + openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); + + #if windows + // Game Over doesn't get his own variable because it's only used here + DiscordClient.changePresence("GAME OVER -- " + SONG.song + " (" + storyDifficultyText + ") " + Ratings.GenerateLetterRank(accuracy),"\nAcc: " + HelperFunctions.truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC); + #end + + // FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y)); + } + } if (unspawnNotes[0] != null) {