Skip to content
Open
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
3 changes: 3 additions & 0 deletions assets/languages/en/Options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<str id="week6PixelPerfect-name">Pixel Perfect Effect</str>
<str id="week6PixelPerfect-desc">If checked, Week 6 or other pixel stages will have a pixel perfect effect to it enabled, aligning every pixel on the screen.</str>

<str id="discordRPC-name">Discord RPC</str>
<str id="discordRPC-desc">If unchecked, Codename Engine and its mods are not displayed under the "Playing" widget.</str>

<group name="AppearanceOptionsAdvanced" prefix="Advanced.">
<str id="quality-name">Quality</str>
<str id="quality-desc">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.</str>
Expand Down
19 changes: 19 additions & 0 deletions source/funkin/backend/utils/DiscordUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand All @@ -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();

Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions source/funkin/options/Options.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions source/funkin/options/categories/AppearanceOptions.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +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'));
#if DISCORD_RPC add(new Checkbox(getNameID('discordRPC'), getDescID('discordRPC'), 'discordRPC')); #end

add(new Separator());
add(new TextOption('optionsMenu.advanced', 'optionsTree.appearance.advanced-desc', ' >', () ->
Expand Down