accuracy toggle and offset removal

This commit is contained in:
KadeDev 2021-04-09 22:19:37 -07:00
parent 61cbfce010
commit 1d8f0828da
4 changed files with 40 additions and 6 deletions

View File

@ -54,6 +54,9 @@ class KadeEngineData
if (FlxG.save.data.frames == null)
FlxG.save.data.frames = 10;
if (FlxG.save.data.accuracyMod == null)
FlxG.save.data.accuracyMod = 1;
Conductor.recalculateTimings();
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);

View File

@ -396,6 +396,26 @@ class ReplayOption extends Option
}
}
class AccuracyDOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.accuracyMod = cast (!FlxG.save.data.accuracyMod, Int);
return false;
}
private override function updateDisplay():String
{
return "Accuracy Mode: " + (FlxG.save.data.accuracyMod == 0 ? "Accurate" : "Complex");
}
}
class CustomizeGameplay extends Option
{
public function new(desc:String)

View File

@ -23,23 +23,24 @@ class OptionsMenu extends MusicBeatState
new OptionCatagory("Gameplay", [
new DFJKOption(controls),
new Judgement("Customize your Hit Timings (LEFT or RIGHT)"),
#if !html
#if !desktop
new FPSCapOption("Cap your FPS (Left for -10, Right for +10. SHIFT to go faster)"),
#end
new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)"),
new OffsetMenu("Get a note offset based off of your inputs!"),
new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"),
// new OffsetMenu("Get a note offset based off of your inputs!"),
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
]),
new OptionCatagory("Appearence", [
new SongPositionOption("Show the songs current position (as a bar)"),
new DownscrollOption("Change the layout of the strumline."),
#if !html
#if !desktop
new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggeled on)"),
#end
new AccuracyOption("Display accuracy information."),
new NPSDisplayOption("Shows your current Notes Per Second.")
]),
#if !mobile
#if !desktop
new OptionCatagory("Misc", [
new FPSOption("Toggle the FPS Counter"),

View File

@ -2176,7 +2176,8 @@ class PlayState extends MusicBeatState
var rating:FlxSprite = new FlxSprite();
var score:Float = 350;
totalNotesHit += wife;
if (FlxG.save.data.accuracyMod == 1)
totalNotesHit += wife;
var daRating = daNote.rating;
@ -2189,12 +2190,16 @@ class PlayState extends MusicBeatState
health -= 0.2;
ss = false;
shits++;
if (FlxG.save.data.accuracyMod == 0)
totalNotesHit--;
case 'bad':
daRating = 'bad';
score = 0;
health -= 0.06;
ss = false;
bads++;
if (FlxG.save.data.accuracyMod == 0)
totalNotesHit += 0.25;
case 'good':
daRating = 'good';
score = 200;
@ -2202,9 +2207,13 @@ class PlayState extends MusicBeatState
goods++;
if (health < 2)
health += 0.04;
if (FlxG.save.data.accuracyMod == 0)
totalNotesHit += 0.50;
case 'sick':
if (health < 2)
health += 0.1;
if (FlxG.save.data.accuracyMod == 0)
totalNotesHit += 1;
sicks++;
}
@ -2817,7 +2826,8 @@ class PlayState extends MusicBeatState
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
totalNotesHit += wife;
if (FlxG.save.data.accuracyMod == 1)
totalNotesHit += wife;
songScore -= 10;