From c8ef7ef967babd7ce349bc80f3d1e407101de2d0 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Tue, 9 Apr 2024 13:33:55 +0200 Subject: [PATCH] Cleanup --- source/funkin/backend/chart/Chart.hx | 2 +- .../funkin/backend/chart/FNFLegacyParser.hx | 2 +- .../events/FreeplayAlphaUpdateEvent.hx | 4 ++-- source/funkin/backend/system/Controls.hx | 2 +- source/funkin/backend/system/Logs.hx | 20 +++++++++---------- .../backend/system/macros/NewHaxeWarning.hx | 2 +- source/funkin/backend/utils/CoolUtil.hx | 2 +- source/funkin/game/Note.hx | 1 - 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index bd13fd50..7a35c2ba 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -230,7 +230,7 @@ class Chart { if(data.meta != null && Reflect.hasField(data.meta, "parsedColor")) Reflect.deleteField(data.meta, "parsedColor"); } - data.events = saveEventsInChart != true ? null : Reflect.copy(chart.events); // same here once again + data.events = saveEventsInChart != true ? null : Reflect.copy(chart.events); // same here once again data.fromMods = null; var sortedData:Dynamic = {}; diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index ddf1588c..59cae28a 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -131,7 +131,7 @@ class FNFLegacyParser { if ((swagSection.mustHitSection && strumLine.type == OPPONENT) || (!swagSection.mustHitSection && strumLine.type == PLAYER)) - sectionNote[1] += 4; + sectionNote[1] += 4; swagSection.sectionNotes.push(note); } } diff --git a/source/funkin/backend/scripting/events/FreeplayAlphaUpdateEvent.hx b/source/funkin/backend/scripting/events/FreeplayAlphaUpdateEvent.hx index 5862f280..639645c2 100644 --- a/source/funkin/backend/scripting/events/FreeplayAlphaUpdateEvent.hx +++ b/source/funkin/backend/scripting/events/FreeplayAlphaUpdateEvent.hx @@ -14,8 +14,8 @@ final class FreeplayAlphaUpdateEvent extends CancellableEvent { */ public var selectedAlpha:Float; /** - * The alpha when something is playing and selected - */ + * The alpha when something is playing and selected + */ public var selectedPlayingAlpha:Float; /** * The lerp of the alpha diff --git a/source/funkin/backend/system/Controls.hx b/source/funkin/backend/system/Controls.hx index 9dbae1f1..76c50d14 100644 --- a/source/funkin/backend/system/Controls.hx +++ b/source/funkin/backend/system/Controls.hx @@ -585,7 +585,7 @@ class Controls extends FlxActionSet #else for (gamepad in controls.gamepadsAdded) if (gamepadsAdded.indexOf(gamepad) == -1) - gamepadsAdded.push(gamepad); + gamepadsAdded.push(gamepad); #end mergeKeyboardScheme(controls.keyboardScheme); diff --git a/source/funkin/backend/system/Logs.hx b/source/funkin/backend/system/Logs.hx index 73060bba..ab317835 100644 --- a/source/funkin/backend/system/Logs.hx +++ b/source/funkin/backend/system/Logs.hx @@ -32,11 +32,11 @@ class Logs { var prefix = "[FLIXEL]"; var color:ConsoleColor = LIGHTGRAY; var level:Level = INFO; - if (Style == LogStyle.CONSOLE) {prefix = "> "; color = WHITE; level = INFO; } else - if (Style == LogStyle.ERROR) {prefix = "[FLIXEL]"; color = RED; level = ERROR; } else - if (Style == LogStyle.NORMAL) {prefix = "[FLIXEL]"; color = WHITE; level = INFO; } else - if (Style == LogStyle.NOTICE) {prefix = "[FLIXEL]"; color = GREEN; level = VERBOSE;} else - if (Style == LogStyle.WARNING) {prefix = "[FLIXEL]"; color = YELLOW; level = WARNING;} + if (Style == LogStyle.CONSOLE) {prefix = "> "; color = WHITE; level = INFO; } else + if (Style == LogStyle.ERROR) {prefix = "[FLIXEL]"; color = RED; level = ERROR; } else + if (Style == LogStyle.NORMAL) {prefix = "[FLIXEL]"; color = WHITE; level = INFO; } else + if (Style == LogStyle.NOTICE) {prefix = "[FLIXEL]"; color = GREEN; level = VERBOSE;} else + if (Style == LogStyle.WARNING) {prefix = "[FLIXEL]"; color = YELLOW; level = WARNING;} var d:Dynamic = Data; if (!(d is Array)) @@ -56,11 +56,11 @@ class Logs { logText('${Std.string(time.getHours()).addZeros(2)}:${Std.string(time.getMinutes()).addZeros(2)}:${Std.string(time.getSeconds()).addZeros(2)}', DARKMAGENTA), logText(' |'), switch(level) { - case WARNING: logText(' WARNING ', DARKYELLOW); - case ERROR: logText(' ERROR ', DARKRED); - case TRACE: logText(' TRACE ', GRAY); - case VERBOSE: logText(' VERBOSE ', DARKMAGENTA); - default: logText(' INFORMATION ', CYAN); + case WARNING: logText(' WARNING ', DARKYELLOW); + case ERROR: logText(' ERROR ', DARKRED); + case TRACE: logText(' TRACE ', GRAY); + case VERBOSE: logText(' VERBOSE ', DARKMAGENTA); + default: logText(' INFORMATION ', CYAN); }, logText('] ') ]; diff --git a/source/funkin/backend/system/macros/NewHaxeWarning.hx b/source/funkin/backend/system/macros/NewHaxeWarning.hx index ee467955..e6a98991 100644 --- a/source/funkin/backend/system/macros/NewHaxeWarning.hx +++ b/source/funkin/backend/system/macros/NewHaxeWarning.hx @@ -3,7 +3,7 @@ package funkin.backend.system.macros; #if macro class NewHaxeWarning { public static function warn() { - #if (haxe >= "4.3.0") + #if (haxe >= "4.3.0" && !display) Sys.println("===================="); Sys.println("[ WARNING ]"); Sys.println("Compiling with Haxe 4.3.0 isnt fully recommended yet, but it does work."); diff --git a/source/funkin/backend/utils/CoolUtil.hx b/source/funkin/backend/utils/CoolUtil.hx index 4817bf5d..58bf7bae 100644 --- a/source/funkin/backend/utils/CoolUtil.hx +++ b/source/funkin/backend/utils/CoolUtil.hx @@ -207,7 +207,7 @@ class CoolUtil * @return String Result without any kind of IP */ public static inline function removeIP(msg:String):String { - return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex + return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex } /** diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index a28ad4b8..d541015d 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -191,7 +191,6 @@ class Note extends FlxSprite } public var lastScrollSpeed:Null = null; - public var angleOffsets:Bool = true; public var gapFix:Single = 0; public var useAntialiasingFix(get, set):Bool; inline function set_useAntialiasingFix(v:Bool) {