1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-21 22:33:26 +00:00

some checkstyle stuff

This commit is contained in:
Cameron Taylor 2024-03-04 19:03:43 -05:00
parent 1f1ccf6256
commit 7f4c36c8f4
3 changed files with 47 additions and 68 deletions

View file

@ -23,10 +23,10 @@
}, },
{ {
"props": { "props": {
"allowSingleArgParens": false, "allowSingleArgParens": true,
"allowReturn": false, "allowReturn": true,
"allowFunction": false, "allowFunction": true,
"allowCurlyBody": false "allowCurlyBody": true
}, },
"type": "ArrowFunction" "type": "ArrowFunction"
}, },
@ -64,10 +64,6 @@
}, },
"type": "CodeSimilarity" "type": "CodeSimilarity"
}, },
{
"props": {},
"type": "CommentedOutCode"
},
{ {
"props": { "props": {
"policy": "aligned", "policy": "aligned",
@ -352,13 +348,6 @@
"props": {}, "props": {},
"type": "MultipleVariableDeclarations" "type": "MultipleVariableDeclarations"
}, },
{
"props": {
"allowSingleLineStatement": true,
"tokens": ["FOR", "IF", "ELSE_IF", "WHILE", "DO_WHILE"]
},
"type": "NeedBraces"
},
{ {
"props": { "props": {
"max": 3, "max": 3,
@ -558,13 +547,6 @@
}, },
"type": "Spacing" "type": "Spacing"
}, },
{
"props": {
"policy": "onlySingle",
"allowException": true
},
"type": "StringLiteral"
},
{ {
"props": { "props": {
"format": "^\\s*(TODO|FIXME|HACK|XXX|BUG)" "format": "^\\s*(TODO|FIXME|HACK|XXX|BUG)"

View file

@ -6,7 +6,6 @@
"tabWidth": 2, "tabWidth": 2,
"indentCaseLabels": true "indentCaseLabels": true
}, },
"lineEnds": { "lineEnds": {
"anonFunctionCurly": { "anonFunctionCurly": {
"emptyCurly": "break", "emptyCurly": "break",

View file

@ -2,27 +2,25 @@ package funkin.play;
import funkin.ui.story.StoryMenuState; import funkin.ui.story.StoryMenuState;
import funkin.graphics.adobeanimate.FlxAtlasSprite; import funkin.graphics.adobeanimate.FlxAtlasSprite;
import flixel.FlxBasic;
import flixel.FlxSprite; import flixel.FlxSprite;
import funkin.graphics.FunkinSprite; import funkin.graphics.FunkinSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.graphics.frames.FlxBitmapFont; import flixel.graphics.frames.FlxBitmapFont;
import flixel.group.FlxGroup.FlxTypedGroup; import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.math.FlxPoint; import flixel.math.FlxPoint;
import funkin.ui.MusicBeatSubState; import funkin.ui.MusicBeatSubState;
import flixel.math.FlxRect; import flixel.math.FlxRect;
import flixel.text.FlxBitmapText; import flixel.text.FlxBitmapText;
import flixel.text.FlxText;
import flixel.tweens.FlxEase; import flixel.tweens.FlxEase;
import funkin.ui.freeplay.FreeplayState; import funkin.ui.freeplay.FreeplayState;
import flixel.tweens.FlxTween; import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import flixel.util.FlxGradient; import flixel.util.FlxGradient;
import flixel.util.FlxTimer; import flixel.util.FlxTimer;
import funkin.graphics.shaders.LeftMaskShader; import funkin.graphics.shaders.LeftMaskShader;
import funkin.play.components.TallyCounter; import funkin.play.components.TallyCounter;
import flxanimate.FlxAnimate.Settings;
/**
* The state for the results screen after a song or week is finished.
*/
class ResultState extends MusicBeatSubState class ResultState extends MusicBeatSubState
{ {
final params:ResultsStateParams; final params:ResultsStateParams;
@ -31,8 +29,8 @@ class ResultState extends MusicBeatSubState
var songName:FlxBitmapText; var songName:FlxBitmapText;
var difficulty:FlxSprite; var difficulty:FlxSprite;
var maskShaderSongName = new LeftMaskShader(); var maskShaderSongName:LeftMaskShader = new LeftMaskShader();
var maskShaderDifficulty = new LeftMaskShader(); var maskShaderDifficulty:LeftMaskShader = new LeftMaskShader();
public function new(params:ResultsStateParams) public function new(params:ResultsStateParams)
{ {
@ -50,22 +48,22 @@ class ResultState extends MusicBeatSubState
else else
resultsVariation = NORMAL; resultsVariation = NORMAL;
var loops = resultsVariation != SHIT; var loops:Bool = resultsVariation != SHIT;
FlxG.sound.playMusic(Paths.music("results" + resultsVariation), 1, loops); FlxG.sound.playMusic(Paths.music("results" + resultsVariation), 1, loops);
// TEMP-ish, just used to sorta "cache" the 3000x3000 image! // TEMP-ish, just used to sorta "cache" the 3000x3000 image!
var cacheBullShit = new FlxSprite().loadGraphic(Paths.image("resultScreen/soundSystem")); var cacheBullShit:FlxSprite = new FlxSprite().loadGraphic(Paths.image("resultScreen/soundSystem"));
add(cacheBullShit); add(cacheBullShit);
var dumb = new FlxSprite().loadGraphic(Paths.image("resultScreen/scorePopin")); var dumb:FlxSprite = new FlxSprite().loadGraphic(Paths.image("resultScreen/scorePopin"));
add(dumb); add(dumb);
var bg:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xFFFECC5C, 0xFFFDC05C], 90); var bg:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xFFFECC5C, 0xFFFDC05C], 90);
bg.scrollFactor.set(); bg.scrollFactor.set();
add(bg); add(bg);
var bgFlash:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xFFffeb69, 0xFFffe66a], 90); var bgFlash:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xFFFFEB69, 0xFFFFE66A], 90);
bgFlash.scrollFactor.set(); bgFlash.scrollFactor.set();
bgFlash.visible = false; bgFlash.visible = false;
add(bgFlash); add(bgFlash);
@ -202,7 +200,7 @@ class ResultState extends MusicBeatSubState
var tallyGood:TallyCounter = new TallyCounter(210, (hStuf * 6) + extraYOffset, params.tallies.good, 0xFF89C9E5); var tallyGood:TallyCounter = new TallyCounter(210, (hStuf * 6) + extraYOffset, params.tallies.good, 0xFF89C9E5);
ratingGrp.add(tallyGood); ratingGrp.add(tallyGood);
var tallyBad:TallyCounter = new TallyCounter(190, (hStuf * 7) + extraYOffset, params.tallies.bad, 0xffE6CF8A); var tallyBad:TallyCounter = new TallyCounter(190, (hStuf * 7) + extraYOffset, params.tallies.bad, 0xFFE6CF8A);
ratingGrp.add(tallyBad); ratingGrp.add(tallyBad);
var tallyShit:TallyCounter = new TallyCounter(220, (hStuf * 8) + extraYOffset, params.tallies.shit, 0xFFE68C8A); var tallyShit:TallyCounter = new TallyCounter(220, (hStuf * 8) + extraYOffset, params.tallies.shit, 0xFFE68C8A);
@ -274,13 +272,13 @@ class ResultState extends MusicBeatSubState
super.create(); super.create();
} }
function timerThenSongName() function timerThenSongName():Void
{ {
movingSongStuff = false; movingSongStuff = false;
difficulty.x = 555; difficulty.x = 555;
var diffYTween = 122; var diffYTween:Float = 122;
difficulty.y = -difficulty.height; difficulty.y = -difficulty.height;
FlxTween.tween(difficulty, {y: diffYTween}, 0.5, {ease: FlxEase.quartOut, startDelay: 0.8}); FlxTween.tween(difficulty, {y: diffYTween}, 0.5, {ease: FlxEase.quartOut, startDelay: 0.8});
@ -310,7 +308,7 @@ class ResultState extends MusicBeatSubState
// maskShaderSongName.frameUV = songName.frame.uv; // maskShaderSongName.frameUV = songName.frame.uv;
} }
override function update(elapsed:Float) override function update(elapsed:Float):Void
{ {
// maskShaderSongName.swagSprX = songName.x; // maskShaderSongName.swagSprX = songName.x;
maskShaderDifficulty.swagSprX = difficulty.x; maskShaderDifficulty.swagSprX = difficulty.x;