-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into match_goals_tracking
- Loading branch information
Showing
4 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 12 additions & 8 deletions
20
Northstar.Client/mod/scripts/vscripts/presence/ui_presence.nut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
return uis | ||
} |