Skip to content

Commit

Permalink
Merge branch 'main' into feat/mad-abort
Browse files Browse the repository at this point in the history
  • Loading branch information
Alystrasz authored Sep 7, 2024
2 parents 76f34e7 + 62b9215 commit afa5104
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 463 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
Drücke Ja, um zuzustimmen. Du kannst diese Entscheidung jederzeit im Modmenü ändern."
"BACK_AUTHENTICATION_AGREEMENT" "Authentifizierungs-Einwilligung"
"AUTHENTICATION_AGREEMENT" "Authentifizierungs-Einwilligung"
"AUTHENTICATION_AGREEMENT_RESTART" "Ein Neustart ist notwendig, um diese Änderung zu übernehmen"
"AUTHENTICATION_AGREEMENT_RESTART" "Ein Neustart ist notwendig, um diese Änderung zu übernehmen."

"DIALOG_AUTHENTICATING_MASTERSERVER" "Authentifizierung mit Master Server"
"DIALOG_AUTHENTICATING_MASTERSERVER" "Authentifizierung mit Master Server."
"AUTHENTICATIONAGREEMENT_NO" "Du hast dich gegen die Authentifizierung mit Northstar entschieden. Du kannst die Authentifizierungs-Einwilligung im Modmenü ansehen."

"MENU_TITLE_SERVER_BROWSER" "Server Browser"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ global struct GameStateStruct {
int otherHighestScore
int maxScore
float timeEnd
int serverGameState
int fd_waveNumber
int fd_totalWaves
}

global struct UIPresenceStruct {
Expand Down
13 changes: 13 additions & 0 deletions Northstar.Client/mod/scripts/vscripts/presence/cl_presence.nut
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
Loading

0 comments on commit afa5104

Please sign in to comment.