From 0e9cd10bce18d6d8dd777e5cc30fc84662d314d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:26:35 +0100 Subject: [PATCH] goddam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bro im so dumb i swear😭 --- source/funkin/backend/system/github/GitHub.hx | 4 ++-- source/funkin/backend/utils/CoolUtil.hx | 2 +- source/funkin/menus/credits/CreditsCodename.hx | 4 +--- source/funkin/menus/credits/CreditsMain.hx | 2 +- source/funkin/options/type/GithubIconOption.hx | 8 ++++---- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/source/funkin/backend/system/github/GitHub.hx b/source/funkin/backend/system/github/GitHub.hx index d869fcf2..13e1d944 100644 --- a/source/funkin/backend/system/github/GitHub.hx +++ b/source/funkin/backend/system/github/GitHub.hx @@ -124,7 +124,7 @@ class GitHub { } private static function isRedirect(status:Int):Bool { switch (status) { - // 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex_isDumb + // 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex case 301 | 302 | 307 | 308 : trace("Redirected with status code: " + status); return true; @@ -197,7 +197,7 @@ class GitHub { } private static function isRedirect(status:Int):Bool { switch (status) { - // 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex_isDumb + // 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex case 301 | 302 | 307 | 308 : trace("Redirected with status code: " + status); return true; diff --git a/source/funkin/backend/utils/CoolUtil.hx b/source/funkin/backend/utils/CoolUtil.hx index d476fc23..01c7f309 100644 --- a/source/funkin/backend/utils/CoolUtil.hx +++ b/source/funkin/backend/utils/CoolUtil.hx @@ -165,7 +165,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_isDumb + 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/menus/credits/CreditsCodename.hx b/source/funkin/menus/credits/CreditsCodename.hx index 491413c9..ab434d4f 100644 --- a/source/funkin/menus/credits/CreditsCodename.hx +++ b/source/funkin/menus/credits/CreditsCodename.hx @@ -32,9 +32,7 @@ class CreditsCodename extends funkin.options.OptionsScreen { //Main.execAsync(function() { var idk = GitHub.getContributors("FNF-CNE-Devs", "CodenameEngine", function(e) { error = true; - var errMsg:String = ~/\d+.\d+.\d+.\d+/.replace(e.message, "[Your IP]"); // Removing sensitive stuff - errMsg = 'Error while trying to download contributors list:\n$errMsg'; - + var errMsg:String = 'Error while trying to download contributors list:\n${CoolUtil.removeIP(e.message)}'; Logs.traceColored([Logs.logText(errMsg.replace('\n', ' '), RED)], ERROR); funkin.backend.utils.NativeAPI.showMessageBox("Codename Engine Warning", errMsg, MSG_WARNING); }); diff --git a/source/funkin/menus/credits/CreditsMain.hx b/source/funkin/menus/credits/CreditsMain.hx index f82d33db..a7edeb68 100644 --- a/source/funkin/menus/credits/CreditsMain.hx +++ b/source/funkin/menus/credits/CreditsMain.hx @@ -61,7 +61,7 @@ class CreditsMain extends TreeMenu { } var username = node.getAtt("user"); - var user = { // Kind of forcing - Nex_isDumb + var user = { // Kind of forcing login: username, html_url: 'https://github.com/$username', avatar_url: 'https://github.com/$username.png' diff --git a/source/funkin/options/type/GithubIconOption.hx b/source/funkin/options/type/GithubIconOption.hx index 91ea1604..cbbef1ed 100644 --- a/source/funkin/options/type/GithubIconOption.hx +++ b/source/funkin/options/type/GithubIconOption.hx @@ -8,7 +8,7 @@ import flixel.util.FlxColor; class GithubIconOption extends TextOption { - public var user(default, null):Dynamic; // Can possibly be GitHubUser or GitHubContributor - Nex_isDumb + public var user(default, null):Dynamic; // Can possibly be GitHubUser or GitHubContributor public var icon:GithubUserIcon = null; public var usePortrait(default, set) = true; @@ -43,7 +43,7 @@ class GithubUserIcon extends FlxSprite } final mutex = new sys.thread.Mutex(); - override function drawComplex(camera:FlxCamera):Void { // Making the image downlaod only if the player actually sees it on the screeeeen - Nex_isDumb + override function drawComplex(camera:FlxCamera):Void { // Making the image downlaod only if the player actually sees it on the screeeeen - Nex if(!loading) { loading = true; Main.execAsync(function() { @@ -67,7 +67,7 @@ class GithubUserIcon extends FlxSprite } if(planB) { - if(unfLink) user = GitHub.getUser(user.login, function(e) Logs.traceColored([Logs.logText('Failed to download github user info for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR)); // Api part - Nex_isDumb + if(unfLink) user = GitHub.getUser(user.login, function(e) Logs.traceColored([Logs.logText('Failed to download github user info for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR)); // Api part - Nex try bytes = GitHub.__requestBytesOnGitHubServers('${user.avatar_url}&size=$size') catch(e) Logs.traceColored([Logs.logText('Failed to download github pfp for ${user.login}: ${CoolUtil.removeIP(e.message)}', RED)], ERROR); @@ -75,7 +75,7 @@ class GithubUserIcon extends FlxSprite } if(bmap != null) try { - mutex.acquire(); // Avoiding critical section - Nex_isDumb + mutex.acquire(); // Avoiding critical section - Nex var leGraphic:FlxGraphic = FlxG.bitmap.add(bmap, false, key); leGraphic.persist = true; updateDaFunni(leGraphic);