mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 12:59:58 -04:00
Turn Discord Rich Presence on by default.
It talks only to a Discord client running on the same PC and does nothing without one; discord_rpc = 0, the Game tab of the settings menu or the launcher's Discord Status row turns it off. The launcher's row reads an empty or missing value as on, as the game does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -590,13 +590,14 @@ class App:
|
||||
|
||||
def discord_row(self, game_dir):
|
||||
"""The game's discord_rpc setting (runtime/discord_rpc.c), kept in the game's nx2navi.ini as the game's own
|
||||
menu keeps it; the game reads it when it starts."""
|
||||
menu keeps it; the game reads it when it starts. On unless the file says 0, as the game reads it (cfg_bool, default
|
||||
on)."""
|
||||
def on(v):
|
||||
try:
|
||||
gameini.put(game_dir, 'discord', 'discord_rpc', '1' if v else '0')
|
||||
except OSError as e:
|
||||
self.message = f'The game\'s settings could not be written: {e}'
|
||||
return Row('toggle', 'Discord Status', on=on, get=lambda: gameini.get(game_dir, 'discord_rpc') == '1',
|
||||
return Row('toggle', 'Discord Status', on=on, get=lambda: gameini.get(game_dir, 'discord_rpc') != '0',
|
||||
desc=('Show "Playing NX2navi" with your play time in your Discord status while the game runs. '
|
||||
'The game\'s menu switches it too (Game tab).',))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user