Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
scoretext things options fixes and other shit
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantCorium committed May 31, 2022
1 parent a4fb7e6 commit b758892
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
22 changes: 17 additions & 5 deletions source/states/gameplay/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ class PlayState extends MusicBeatState

var inCutscene:Bool = false;

var sicks:Int;
var goods:Int;
var bads:Int;
var shits:Int;

#if desktop
// Discord RPC variables
var storyDifficultyText:String = "";
Expand Down Expand Up @@ -1431,7 +1436,8 @@ class PlayState extends MusicBeatState

scoreTxt.text = 'Score: ${songScore} - '+
'Combo: ${combo} - '+
'Misses: ${misses}';
'Misses: ${misses} - ' +
'Hit %: ${(sicks + goods + bads + shits + misses == 0) ? 0 : (sicks + goods + bads + shits) / (sicks + goods + bads + shits + misses) * 100}%';

if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause)
{
Expand Down Expand Up @@ -1749,6 +1755,7 @@ class PlayState extends MusicBeatState
if (daNote.tooLate || !daNote.wasGoodHit)
{
misses++;
combo = 0;
health -= 0.0475;
vocals.volume = 0;
}
Expand Down Expand Up @@ -1872,18 +1879,23 @@ class PlayState extends MusicBeatState
if (offset > Std.int(Option.recieveValue("DEBUG_shitTiming")) || offset < -Std.int(Option.recieveValue("DEBUG_shitTiming")))
{
daRating = 'shit';
shits++;
score = 50;
}
else if (offset > Std.int(Option.recieveValue("DEBUG_badTiming")) || offset < -Std.int(Option.recieveValue("DEBUG_badTiming")))
{
daRating = 'bad';
bads++;
score = 100;
}
else if (offset > Std.int(Option.recieveValue("DEBUG_goodTiming")) || offset < -Std.int(Option.recieveValue("DEBUG_goodTiming")))
{
daRating = 'good';
goods++;
score = 200;
}
else
sicks++;

songScore += score;

Expand Down Expand Up @@ -2039,7 +2051,7 @@ class PlayState extends MusicBeatState
if (upP)
{
boyfriend.holdTimer = 0;
if (!FlxG.overlap(notes, playerStrums))
if (!FlxG.overlap(notes, playerStrums) && Option.recieveValue("GAMEPLAY_ghostTapping") == 1)
{
// we didn't hit shit.

Expand Down Expand Up @@ -2067,7 +2079,7 @@ class PlayState extends MusicBeatState
if (downP)
{
boyfriend.holdTimer = 0;
if (!FlxG.overlap(notes, playerStrums))
if (!FlxG.overlap(notes, playerStrums) && Option.recieveValue("GAMEPLAY_ghostTapping") == 1)
{
// we didn't hit shit.

Expand Down Expand Up @@ -2095,7 +2107,7 @@ class PlayState extends MusicBeatState
if (leftP)
{
boyfriend.holdTimer = 0;
if (!FlxG.overlap(notes, playerStrums))
if (!FlxG.overlap(notes, playerStrums) && Option.recieveValue("GAMEPLAY_ghostTapping") == 1)
{
// we didn't hit shit.

Expand Down Expand Up @@ -2123,7 +2135,7 @@ class PlayState extends MusicBeatState
if (rightP)
{
boyfriend.holdTimer = 0;
if (!FlxG.overlap(notes, playerStrums))
if (!FlxG.overlap(notes, playerStrums) && Option.recieveValue("GAMEPLAY_ghostTapping") == 1)
{
// we didn't hit shit.

Expand Down
3 changes: 2 additions & 1 deletion source/states/menu/OptionsMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ class OptionsMenu extends MusicBeatState
]),
new OptionGroup("Gameplay", [
new CycleOption("Show Score Text %v", "Whether to show the score text or not", ["On", "Off"], "GAMEPLAY_showScoreTxt"),
new CycleOption("Difficult Jacks %v", "With this option turned off, you only need to press once to trigger both notes.", ["On", "Off"], "GAMEPLAY_difficultJacks"),
//! broken! new CycleOption("Difficult Jacks %v", "With this option turned off, you only need to press once to trigger both notes.", ["On", "Off"], "GAMEPLAY_difficultJacks"),
new CycleOption("Ghost Tapping %v", "When enabled, you will not get a miss for pressing a key without a note.", ["On", "Off"], "GAMEPLAY_ghostTapping"),
]),
new OptionGroup("Misc", [
new FunctionOption("Reset Option", "Resets all options to their default values.", clearOptions)
Expand Down

0 comments on commit b758892

Please sign in to comment.