aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut20
1 files changed, 12 insertions, 8 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut b/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
index cdf1c981..ce5abe86 100644
--- a/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
+++ b/Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
@@ -1,12 +1,16 @@
untyped
globalize_all_functions
-void function NorthstarCodeCallback_GenerateUIPresence() {
- UIPresenceStruct uis
+UIPresenceStruct function DiscordRPC_GenerateUIPresence( UIPresenceStruct uis )
+{
+ if ( uiGlobal.isLoading )
+ uis.gameState = eDiscordGameState.LOADING;
+ else if ( uiGlobal.loadedLevel == "" )
+ uis.gameState = eDiscordGameState.MAINMENU;
+ else if ( IsLobby() || uiGlobal.loadedLevel == "mp_lobby" )
+ uis.gameState = eDiscordGameState.LOBBY;
+ else
+ uis.gameState = eDiscordGameState.INGAME;
- uis.isLoading = uiGlobal.isLoading
- uis.isLobby = IsLobby()
- uis.loadingLevel = uiGlobal.loadingLevel
- uis.loadedLevel = uiGlobal.loadedLevel
- NSPushUIPresence(uis)
-} \ No newline at end of file
+ return uis
+}