Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix the formatting on a few files #4113

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions source/funkin/data/song/SongRegistry.hx
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,32 @@ class SongRegistry extends BaseRegistry<Song, SongMetadata>
public function listBaseGameSongIds():Array<String>
{
return [
"tutorial", "bopeebo", "fresh", "dadbattle", "spookeez", "south", "monster", "pico", "philly-nice", "blammed", "satin-panties", "high", "milf", "cocoa",
"eggnog", "winter-horrorland", "senpai", "roses", "thorns", "ugh", "guns", "stress", "darnell", "lit-up", "2hot", "blazin"
"tutorial",
"bopeebo",
"fresh",
"dadbattle",
"spookeez",
"south",
"monster",
"pico",
"philly-nice",
"blammed",
"satin-panties",
"high",
"milf",
"cocoa",
"eggnog",
"winter-horrorland",
"senpai",
"roses",
"thorns",
"ugh",
"guns",
"stress",
"darnell",
"lit-up",
"2hot",
"blazin"
];
}

Expand Down
18 changes: 16 additions & 2 deletions source/funkin/data/stage/StageRegistry.hx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,22 @@ class StageRegistry extends BaseRegistry<Stage, StageData>
public function listBaseGameStageIds():Array<String>
{
return [
"mainStage", "mainStageErect", "spookyMansion", "phillyTrain", "phillyTrainErect", "limoRide", "limoRideErect", "mallXmas", "mallXmasErect", "mallEvil",
"school", "schoolEvil", "tankmanBattlefield", "phillyStreets", "phillyStreetsErect", "phillyBlazin",
"mainStage",
"mainStageErect",
"spookyMansion",
"phillyTrain",
"phillyTrainErect",
"limoRide",
"limoRideErect",
"mallXmas",
"mallXmasErect",
"mallEvil",
"school",
"schoolEvil",
"tankmanBattlefield",
"phillyStreets",
"phillyStreetsErect",
"phillyBlazin",
];
}

Expand Down
15 changes: 13 additions & 2 deletions source/funkin/modding/PolymodHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,19 @@ class PolymodHandler
{
return {
assetLibraryPaths: [
'default' => 'preload', 'shared' => 'shared', 'songs' => 'songs', 'videos' => 'videos', 'tutorial' => 'tutorial', 'week1' => 'week1',
'week2' => 'week2', 'week3' => 'week3', 'week4' => 'week4', 'week5' => 'week5', 'week6' => 'week6', 'week7' => 'week7', 'weekend1' => 'weekend1',
'default' => 'preload',
'shared' => 'shared',
'songs' => 'songs',
'videos' => 'videos',
'tutorial' => 'tutorial',
'week1' => 'week1',
'week2' => 'week2',
'week3' => 'week3',
'week4' => 'week4',
'week5' => 'week5',
'week6' => 'week6',
'week7' => 'week7',
'weekend1' => 'weekend1',
],
coreAssetRedirect: CORE_FOLDER,
}
Expand Down
68 changes: 36 additions & 32 deletions source/funkin/play/ResultScore.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class ResultScore extends FlxTypedSpriteGroup<ScoreNum>

public function animateNumbers():Void
{
for (i in group.members.length-scoreStart...group.members.length)
for (i in group.members.length - scoreStart...group.members.length)
{
// if(i.finalDigit == 10) continue;
// if(i.finalDigit == 10) continue;

new FlxTimer().start((i-1)/24, _ -> {
group.members[i].finalDelay = scoreStart - (i-1);
new FlxTimer().start((i - 1) / 24, _ -> {
group.members[i].finalDelay = scoreStart - (i - 1);
group.members[i].playAnim();
group.members[i].shuffle();
});
Expand Down Expand Up @@ -97,29 +97,32 @@ class ScoreNum extends FlxSprite
{
if (val >= 0 && animation.curAnim != null && animation.curAnim.name != numToString[val])
{
if(glow){
if (glow)
{
animation.play(numToString[val], true, false, 0);
glow = false;
}else{
}
else
{
animation.play(numToString[val], true, false, 4);
}
updateHitbox();

switch (val)
{
case 1:
// offset.x -= 15;
// offset.x -= 15;
case 5:
// set offsets
// offset.x += 0;
// offset.y += 10;
// set offsets
// offset.x += 0;
// offset.y += 10;

case 7:
// offset.y += 6;
// offset.y += 6;
case 4:
// offset.y += 5;
// offset.y += 5;
case 9:
// offset.y += 5;
// offset.y += 5;
default:
centerOffsets(false);
}
Expand All @@ -144,44 +147,45 @@ class ScoreNum extends FlxSprite
"ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "DISABLED"
];

function finishShuffleTween():Void{

function finishShuffleTween():Void
{
var tweenFunction = function(x) {
var digitRounded = Math.floor(x);
//if(digitRounded == finalDigit) glow = true;
// if(digitRounded == finalDigit) glow = true;
digit = digitRounded;
};

finalTween = FlxTween.num(0.0, finalDigit, 23/24, {
ease: FlxEase.quadOut,
onComplete: function (input) {
new FlxTimer().start((finalDelay)/24, _ -> {
animation.play(animation.curAnim.name, true, false, 0);
});
// fuck
}
}, tweenFunction);
finalTween = FlxTween.num(0.0, finalDigit, 23 / 24,
{
ease: FlxEase.quadOut,
onComplete: function(input) {
new FlxTimer().start((finalDelay) / 24, _ -> {
animation.play(animation.curAnim.name, true, false, 0);
});
// fuck
}
}, tweenFunction);
}


function shuffleProgress(shuffleTimer:FlxTimer):Void
{
var tempDigit:Int = digit;
tempDigit += 1;
if(tempDigit > 9) tempDigit = 0;
if(tempDigit < 0) tempDigit = 0;
if (tempDigit > 9) tempDigit = 0;
if (tempDigit < 0) tempDigit = 0;
digit = tempDigit;

if (shuffleTimer.loops > 0 && shuffleTimer.loopsLeft == 0)
{
//digit = finalDigit;
// digit = finalDigit;
finishShuffleTween();
}
}

public function shuffle():Void{
var duration:Float = 41/24;
var interval:Float = 1/24;
public function shuffle():Void
{
var duration:Float = 41 / 24;
var interval:Float = 1 / 24;
shuffleTimer = new FlxTimer().start(interval, shuffleProgress, Std.int(duration / interval));
}

Expand Down
34 changes: 19 additions & 15 deletions source/funkin/play/ResultState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -730,19 +730,22 @@ class ResultState extends MusicBeatSubState

if (controls.PAUSE)
{
if (introMusicAudio != null) {
if (introMusicAudio != null)
{
@:nullSafety(Off)
introMusicAudio.onComplete = null;

FlxTween.tween(introMusicAudio, {volume: 0}, 0.8, {
onComplete: _ -> {
if (introMusicAudio != null) {
introMusicAudio.stop();
introMusicAudio.destroy();
introMusicAudio = null;
FlxTween.tween(introMusicAudio, {volume: 0}, 0.8,
{
onComplete: _ -> {
if (introMusicAudio != null)
{
introMusicAudio.stop();
introMusicAudio.destroy();
introMusicAudio = null;
}
}
}
});
});
FlxTween.tween(introMusicAudio, {pitch: 3}, 0.1,
{
onComplete: _ -> {
Expand All @@ -752,12 +755,13 @@ class ResultState extends MusicBeatSubState
}
else if (FlxG.sound.music != null)
{
FlxTween.tween(FlxG.sound.music, {volume: 0}, 0.8, {
onComplete: _ -> {
FlxG.sound.music.stop();
FlxG.sound.music.destroy();
}
});
FlxTween.tween(FlxG.sound.music, {volume: 0}, 0.8,
{
onComplete: _ -> {
FlxG.sound.music.stop();
FlxG.sound.music.destroy();
}
});
FlxTween.tween(FlxG.sound.music, {pitch: 3}, 0.1,
{
onComplete: _ -> {
Expand Down
4 changes: 2 additions & 2 deletions source/funkin/play/notes/SustainTrail.hx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class SustainTrail extends FlxSprite
* Whether the note will recieve custom vertex data
*/
public var customVertexData:Bool = false;

public var isPixel:Bool;
public var noteStyleOffsets:Array<Float>;

Expand Down Expand Up @@ -176,7 +176,7 @@ class SustainTrail extends FlxSprite
this.uvtData = new DrawData<Float>(uvtData.length, false, uvtData);
}
}

/**
* Creates hold note graphic and applies correct zooming
* @param noteStyle The note style
Expand Down
3 changes: 2 additions & 1 deletion source/funkin/play/notes/notestyle/NoteStyle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class NoteStyle implements IRegistryEntry<NoteStyleData>
*/
var fallback(get, never):Null<NoteStyle>;

function get_fallback():Null<NoteStyle> {
function get_fallback():Null<NoteStyle>
{
if (_data == null || _data.fallback == null) return null;
return NoteStyleRegistry.instance.fetchEntry(_data.fallback);
}
Expand Down
7 changes: 4 additions & 3 deletions source/funkin/ui/options/PreferencesMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ class PreferencesMenu extends Page
createPrefItemCheckbox('Downscroll', 'If enabled, this will make the notes move downwards.', function(value:Bool):Void {
Preferences.downscroll = value;
}, Preferences.downscroll);
createPrefItemCheckbox('Flashing Lights', 'If disabled, it will dampen flashing effects. Useful for people with photosensitive epilepsy.', function(value:Bool):Void {
Preferences.flashingLights = value;
}, Preferences.flashingLights);
createPrefItemCheckbox('Flashing Lights', 'If disabled, it will dampen flashing effects. Useful for people with photosensitive epilepsy.',
function(value:Bool):Void {
Preferences.flashingLights = value;
}, Preferences.flashingLights);
createPrefItemCheckbox('Camera Zooms', 'If disabled, camera stops bouncing to the song.', function(value:Bool):Void {
Preferences.zoomCamera = value;
}, Preferences.zoomCamera);
Expand Down
1 change: 1 addition & 0 deletions source/funkin/ui/story/LevelTitle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class LevelTitle extends FlxSpriteGroup
}

public var isFlashing:Bool = false;

var flashTick:Float = 0;
final flashFramerate:Float = 20;

Expand Down
Loading