Merge pull request #490 from CyndaquilDAC/blueball-button-option
Reset button option
This commit is contained in:
commit
4a3d51493e
@ -65,6 +65,9 @@ class KadeEngineData
|
|||||||
|
|
||||||
if (FlxG.save.data.flashing == null)
|
if (FlxG.save.data.flashing == null)
|
||||||
FlxG.save.data.flashing = true;
|
FlxG.save.data.flashing = true;
|
||||||
|
|
||||||
|
if (FlxG.save.data.resetButton == null)
|
||||||
|
FlxG.save.data.resetButton = false;
|
||||||
|
|
||||||
if (FlxG.save.data.botplay == null)
|
if (FlxG.save.data.botplay == null)
|
||||||
FlxG.save.data.botplay = false;
|
FlxG.save.data.botplay = false;
|
||||||
|
@ -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
|
class FlashingLightsOption extends Option
|
||||||
{
|
{
|
||||||
public function new(desc:String)
|
public function new(desc:String)
|
||||||
|
@ -30,6 +30,7 @@ class OptionsMenu extends MusicBeatState
|
|||||||
#end
|
#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 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 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 OffsetMenu("Get a note offset based off of your inputs!"),
|
||||||
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
||||||
]),
|
]),
|
||||||
@ -51,7 +52,7 @@ class OptionsMenu extends MusicBeatState
|
|||||||
new ReplayOption("View replays"),
|
new ReplayOption("View replays"),
|
||||||
#end
|
#end
|
||||||
new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain."),
|
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.")
|
new BotPlay("Showcase your charts and mods with autoplay.")
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package;
|
package;
|
||||||
|
|
||||||
|
import flixel.input.keyboard.FlxKey;
|
||||||
import haxe.Exception;
|
import haxe.Exception;
|
||||||
import openfl.geom.Matrix;
|
import openfl.geom.Matrix;
|
||||||
import openfl.display.BitmapData;
|
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);
|
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//dialogue shit
|
//dialogue shit
|
||||||
switch (SONG.song.toLowerCase())
|
switch (SONG.song.toLowerCase())
|
||||||
{
|
{
|
||||||
@ -726,8 +725,6 @@ class PlayState extends MusicBeatState
|
|||||||
gfVersion = 'gf-christmas';
|
gfVersion = 'gf-christmas';
|
||||||
case 'gf-pixel':
|
case 'gf-pixel':
|
||||||
gfVersion = 'gf-pixel';
|
gfVersion = 'gf-pixel';
|
||||||
case 'gf':
|
|
||||||
gfVersion = 'gf';
|
|
||||||
default:
|
default:
|
||||||
gfVersion = 'gf';
|
gfVersion = 'gf';
|
||||||
}
|
}
|
||||||
@ -1788,7 +1785,7 @@ class PlayState extends MusicBeatState
|
|||||||
// 1 / 1000 chance for Gitaroo Man easter egg
|
// 1 / 1000 chance for Gitaroo Man easter egg
|
||||||
if (FlxG.random.bool(0.1))
|
if (FlxG.random.bool(0.1))
|
||||||
{
|
{
|
||||||
// gitaroo man easter egg
|
trace('GITAROO MAN EASTER EGG');
|
||||||
FlxG.switchState(new GitarooPause());
|
FlxG.switchState(new GitarooPause());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1852,7 +1849,19 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FlxG.keys.justPressed.ZERO)
|
||||||
|
{
|
||||||
|
FlxG.switchState(new AnimationDebug(SONG.player1));
|
||||||
|
#if windows
|
||||||
|
if (luaModchart != null)
|
||||||
|
{
|
||||||
|
luaModchart.die();
|
||||||
|
luaModchart = null;
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|
||||||
if (startingSong)
|
if (startingSong)
|
||||||
@ -2122,6 +2131,29 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
// 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)
|
if (unspawnNotes[0] != null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user