aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut3
-rw-r--r--Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut13
2 files changed, 16 insertions, 0 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut b/Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut
index 3560fd56..9e683a86 100644
--- a/Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut
+++ b/Northstar.Client/mod/scripts/vscripts/cl_northstar_client_init.nut
@@ -20,6 +20,9 @@ global struct GameStateStruct {
int otherHighestScore
int maxScore
float timeEnd
+ int serverGameState
+ int fd_waveNumber
+ int fd_totalWaves
}
global struct UIPresenceStruct {
diff --git a/Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut b/Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut
index f17216fb..142c94ba 100644
--- a/Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut
+++ b/Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut
@@ -30,6 +30,19 @@ GameStateStruct function DiscordRPC_GenerateGameState( GameStateStruct gs )
if ( IsValid( GetLocalClientPlayer() ) )
gs.ownScore = GameRules_GetTeamScore( GetLocalClientPlayer().GetTeam() )
+ if ( GameRules_GetGameMode() == FD )
+ {
+ gs.playlist = "fd" // So it returns only one thing to the plugin side instead of the 5 separate difficulties FD have
+ if ( GetGlobalNetInt( "FD_waveState" ) == WAVE_STATE_INCOMING || GetGlobalNetInt( "FD_waveState" ) == WAVE_STATE_IN_PROGRESS )
+ {
+ gs.fd_waveNumber = GetGlobalNetInt( "FD_currentWave" ) + 1
+ gs.fd_totalWaves = GetGlobalNetInt( "FD_totalWaves" )
+ }
+ else
+ gs.fd_waveNumber = -1 // Tells plugin it's on Wave Break
+ }
+
+ gs.serverGameState = GetGameState() == -1 ? 0 : GetGameState()
gs.otherHighestScore = gs.ownScore == highestScore ? secondHighest : highestScore
gs.maxScore = IsRoundBased() ? GetCurrentPlaylistVarInt( "roundscorelimit", 0 ) : GetCurrentPlaylistVarInt( "scorelimit", 0 )