diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-08 01:03:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-08 01:03:43 -0300 |
commit | 608ad36f1c7023f09e9fda0b981b8025b324b5ae (patch) | |
tree | adb9e7152fe302df99910a683c676085af1a02b7 | |
parent | 7805a9651eea35f8b18beb46942fc4b030f906d9 (diff) | |
download | renpy-608ad36f1c7023f09e9fda0b981b8025b324b5ae.tar.gz renpy-608ad36f1c7023f09e9fda0b981b8025b324b5ae.tar.bz2 renpy-608ad36f1c7023f09e9fda0b981b8025b324b5ae.tar.xz renpy-608ad36f1c7023f09e9fda0b981b8025b324b5ae.zip |
Settings - Players are now capable to disable Discord Rich Presence if they wish
-rw-r--r-- | game/core.rpy | 2 | ||||
-rw-r--r-- | game/discord.rpy | 6 | ||||
-rw-r--r-- | game/options.rpy | 2 | ||||
-rw-r--r-- | game/screens.rpy | 9 |
4 files changed, 14 insertions, 5 deletions
diff --git a/game/core.rpy b/game/core.rpy index 3aa51bc..1b8bbb2 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -27,6 +27,8 @@ init -3 python: # Configuration config.autoreload = False config.save_on_mobile_background = False + if (persistent.discord is None): + persistent.discord = True ############################################################################# persistent.release_name = "Core" diff --git a/game/discord.rpy b/game/discord.rpy index 3160158..d8b9c06 100644 --- a/game/discord.rpy +++ b/game/discord.rpy @@ -21,6 +21,9 @@ init -2 python: )) def RPCUpdate(title, subtitle, image): + if not persistent.discord: + stdout("Discord RPC disabled, update skipped") + return discord_rpc.update_connection() discord_rpc.run_callbacks() discord_rpc.update_presence( @@ -35,6 +38,9 @@ init -2 python: discord_rpc.run_callbacks() label before_main_menu: + if not persistent.discord: + $ stdout("Discord RPC disabled") + return python: # Note: 'event_name': callback callbacks = { diff --git a/game/options.rpy b/game/options.rpy index 503217f..0a01d99 100644 --- a/game/options.rpy +++ b/game/options.rpy @@ -47,7 +47,7 @@ define build.name = "Mana-Launcher" define config.has_sound = True define config.has_music = True -define config.has_voice = True +define config.has_voice = False ## To allow the user to play a test sound on the sound or voice channel, diff --git a/game/screens.rpy b/game/screens.rpy index b844630..d977c73 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -655,10 +655,11 @@ screen preferences(): vbox: style_prefix "radio" - label _("Rollback Side") - textbutton _("Disable") action Preference("rollback side", "disable") - textbutton _("Left") action Preference("rollback side", "left") - textbutton _("Right") action Preference("rollback side", "right") + label _("Discord Integration") + textbutton ifte(persistent.discord, + _("Enabled"), + _("Disabled")): + action ToggleVariable("persistent.discord") vbox: style_prefix "check" |