From e1a01a0bc543455da2650c7c7e6faf057e67f627 Mon Sep 17 00:00:00 2001 From: KirbyKidJ <70983335+KirbyKid256@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:26:20 -0700 Subject: [PATCH 1/2] Added Discord RPC Toggle --- assets/languages/en/Options.xml | 3 +++ source/funkin/backend/utils/DiscordUtil.hx | 19 +++++++++++++++++++ source/funkin/options/Options.hx | 1 + .../options/categories/AppearanceOptions.hx | 2 ++ 4 files changed, 25 insertions(+) diff --git a/assets/languages/en/Options.xml b/assets/languages/en/Options.xml index 0227aeb67a..4039113e5d 100644 --- a/assets/languages/en/Options.xml +++ b/assets/languages/en/Options.xml @@ -85,6 +85,9 @@ Pixel Perfect Effect If checked, Week 6 or other pixel stages will have a pixel perfect effect to it enabled, aligning every pixel on the screen. + Discord RPC + If unchecked, Codename Engine and its mods are not displayed under the "Playing" widget. + Quality Quality modes to choose, "LOW" = Disable every heavy visual effects as it can get to smoothen the gameplay, "HIGH" = Enable all of the visual effects, with the cost of performance, "CUSTOM" = Allow of custom options that is available in Advanced. diff --git a/source/funkin/backend/utils/DiscordUtil.hx b/source/funkin/backend/utils/DiscordUtil.hx index 84791be2e2..432120f084 100644 --- a/source/funkin/backend/utils/DiscordUtil.hx +++ b/source/funkin/backend/utils/DiscordUtil.hx @@ -139,6 +139,11 @@ final class DiscordUtil public static function changePresence(details:String, state:String, ?smallImageKey:String) { #if DISCORD_RPC + if (!Options.discordRPC) { + clearPresence(); + return; + } + changePresenceAdvanced({ state: state, details: details, @@ -150,6 +155,11 @@ final class DiscordUtil public static function changeSongPresence(details:String, state:String, audio:FlxSound, ?smallImageKey:String) { #if DISCORD_RPC + if (!Options.discordRPC) { + clearPresence(); + return; + } + var start:Float = 0; var end:Float = 0; @@ -172,6 +182,11 @@ final class DiscordUtil public static function changePresenceSince(details:String, state:String, ?smallImageKey:String, ?time:Float) { #if DISCORD_RPC + if (!Options.discordRPC) { + clearPresence(); + return; + } + if (time == null) time = Date.now().getTime(); @@ -199,6 +214,10 @@ final class DiscordUtil public static function changePresenceAdvanced(data:DPresence) { #if DISCORD_RPC + if (!Options.discordRPC) { + clearPresence(); + return; + } if (data == null) return; diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index b959e5e998..299f5c30de 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -42,6 +42,7 @@ class Options public static var volumeMusic:Float = 1; public static var volumeSFX:Float = 1; public static var week6PixelPerfect:Bool = true; + public static var discordRPC:Bool = true; public static var gameplayShaders:Bool = true; public static var colorHealthBar:Bool = true; public static var lowMemoryMode:Bool = false; diff --git a/source/funkin/options/categories/AppearanceOptions.hx b/source/funkin/options/categories/AppearanceOptions.hx index 9472ccf83d..bfc63706b4 100644 --- a/source/funkin/options/categories/AppearanceOptions.hx +++ b/source/funkin/options/categories/AppearanceOptions.hx @@ -1,6 +1,7 @@ package funkin.options.categories; import funkin.backend.system.framerate.Framerate; +import funkin.backend.utils.DiscordUtil; class AppearanceOptions extends TreeMenuScreen { var framerateOption:NumOption; // use for changing the text @@ -19,6 +20,7 @@ class AppearanceOptions extends TreeMenuScreen { add(new Checkbox(getNameID('flashingMenu'), getDescID('flashingMenu'), 'flashingMenu')); add(new Checkbox(getNameID('colorHealthBar'), getDescID('colorHealthBar'), 'colorHealthBar')); add(new Checkbox(getNameID('week6PixelPerfect'), getDescID('week6PixelPerfect'), 'week6PixelPerfect')); + add(new Checkbox(getNameID('discordRPC'), getDescID('discordRPC'), 'discordRPC')); add(new Separator()); add(new TextOption('optionsMenu.advanced', 'optionsTree.appearance.advanced-desc', ' >', () -> From ab5aa1c177f8eb725d683f4f6e0b592d8025203a Mon Sep 17 00:00:00 2001 From: KirbyKidJ <70983335+KirbyKid256@users.noreply.github.com> Date: Mon, 14 Sep 2026 22:27:39 -0700 Subject: [PATCH 2/2] Update AppearanceOptions.hx --- source/funkin/options/categories/AppearanceOptions.hx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/funkin/options/categories/AppearanceOptions.hx b/source/funkin/options/categories/AppearanceOptions.hx index bfc63706b4..61895bd1fa 100644 --- a/source/funkin/options/categories/AppearanceOptions.hx +++ b/source/funkin/options/categories/AppearanceOptions.hx @@ -1,7 +1,6 @@ package funkin.options.categories; import funkin.backend.system.framerate.Framerate; -import funkin.backend.utils.DiscordUtil; class AppearanceOptions extends TreeMenuScreen { var framerateOption:NumOption; // use for changing the text @@ -20,7 +19,7 @@ class AppearanceOptions extends TreeMenuScreen { add(new Checkbox(getNameID('flashingMenu'), getDescID('flashingMenu'), 'flashingMenu')); add(new Checkbox(getNameID('colorHealthBar'), getDescID('colorHealthBar'), 'colorHealthBar')); add(new Checkbox(getNameID('week6PixelPerfect'), getDescID('week6PixelPerfect'), 'week6PixelPerfect')); - add(new Checkbox(getNameID('discordRPC'), getDescID('discordRPC'), 'discordRPC')); + #if DISCORD_RPC add(new Checkbox(getNameID('discordRPC'), getDescID('discordRPC'), 'discordRPC')); #end add(new Separator()); add(new TextOption('optionsMenu.advanced', 'optionsTree.appearance.advanced-desc', ' >', () ->