1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-21 20:56:48 +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": {
"allowSingleArgParens": false,
"allowReturn": false,
"allowFunction": false,
"allowCurlyBody": false
"allowSingleArgParens": true,
"allowReturn": true,
"allowFunction": true,
"allowCurlyBody": true
},
"type": "ArrowFunction"
},
@ -64,10 +64,6 @@
},
"type": "CodeSimilarity"
},
{
"props": {},
"type": "CommentedOutCode"
},
{
"props": {
"policy": "aligned",
@ -352,13 +348,6 @@
"props": {},
"type": "MultipleVariableDeclarations"
},
{
"props": {
"allowSingleLineStatement": true,
"tokens": ["FOR", "IF", "ELSE_IF", "WHILE", "DO_WHILE"]
},
"type": "NeedBraces"
},
{
"props": {
"max": 3,
@ -558,13 +547,6 @@
},
"type": "Spacing"
},
{
"props": {
"policy": "onlySingle",
"allowException": true
},
"type": "StringLiteral"
},
{
"props": {
"format": "^\\s*(TODO|FIXME|HACK|XXX|BUG)"

View file

@ -1,31 +1,30 @@
{
"disableFormatting": false,
"indentation": {
"character": " ",
"tabWidth": 2,
"indentCaseLabels": true
},
"lineEnds": {
"anonFunctionCurly": {
"emptyCurly": "break",
"leftCurly": "after",
"rightCurly": "both"
},
"leftCurly": "both",
"rightCurly": "both"
},
"sameLine": {
"ifBody": "same",
"ifElse": "next",
"doWhile": "next",
"tryBody": "next",
"tryCatch": "next"
},
"whitespace": {
"switchPolicy": "around"
}
}
{
"disableFormatting": false,
"indentation": {
"character": " ",
"tabWidth": 2,
"indentCaseLabels": true
},
"lineEnds": {
"anonFunctionCurly": {
"emptyCurly": "break",
"leftCurly": "after",
"rightCurly": "both"
},
"leftCurly": "both",
"rightCurly": "both"
},
"sameLine": {
"ifBody": "same",
"ifElse": "next",
"doWhile": "next",
"tryBody": "next",
"tryCatch": "next"
},
"whitespace": {
"switchPolicy": "around"
}
}

View file

@ -2,27 +2,25 @@ package funkin.play;
import funkin.ui.story.StoryMenuState;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
import flixel.FlxBasic;
import flixel.FlxSprite;
import funkin.graphics.FunkinSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.graphics.frames.FlxBitmapFont;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.math.FlxPoint;
import funkin.ui.MusicBeatSubState;
import flixel.math.FlxRect;
import flixel.text.FlxBitmapText;
import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import funkin.ui.freeplay.FreeplayState;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import flixel.util.FlxGradient;
import flixel.util.FlxTimer;
import funkin.graphics.shaders.LeftMaskShader;
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
{
final params:ResultsStateParams;
@ -31,8 +29,8 @@ class ResultState extends MusicBeatSubState
var songName:FlxBitmapText;
var difficulty:FlxSprite;
var maskShaderSongName = new LeftMaskShader();
var maskShaderDifficulty = new LeftMaskShader();
var maskShaderSongName:LeftMaskShader = new LeftMaskShader();
var maskShaderDifficulty:LeftMaskShader = new LeftMaskShader();
public function new(params:ResultsStateParams)
{
@ -50,22 +48,22 @@ class ResultState extends MusicBeatSubState
else
resultsVariation = NORMAL;
var loops = resultsVariation != SHIT;
var loops:Bool = resultsVariation != SHIT;
FlxG.sound.playMusic(Paths.music("results" + resultsVariation), 1, loops);
// 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);
var dumb = new FlxSprite().loadGraphic(Paths.image("resultScreen/scorePopin"));
var dumb:FlxSprite = new FlxSprite().loadGraphic(Paths.image("resultScreen/scorePopin"));
add(dumb);
var bg:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xFFFECC5C, 0xFFFDC05C], 90);
bg.scrollFactor.set();
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.visible = false;
add(bgFlash);
@ -202,7 +200,7 @@ class ResultState extends MusicBeatSubState
var tallyGood:TallyCounter = new TallyCounter(210, (hStuf * 6) + extraYOffset, params.tallies.good, 0xFF89C9E5);
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);
var tallyShit:TallyCounter = new TallyCounter(220, (hStuf * 8) + extraYOffset, params.tallies.shit, 0xFFE68C8A);
@ -274,13 +272,13 @@ class ResultState extends MusicBeatSubState
super.create();
}
function timerThenSongName()
function timerThenSongName():Void
{
movingSongStuff = false;
difficulty.x = 555;
var diffYTween = 122;
var diffYTween:Float = 122;
difficulty.y = -difficulty.height;
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;
}
override function update(elapsed:Float)
override function update(elapsed:Float):Void
{
// maskShaderSongName.swagSprX = songName.x;
maskShaderDifficulty.swagSprX = difficulty.x;