From 48f2810afb01c6920314382bb55c09f76d8fc6af Mon Sep 17 00:00:00 2001 From: Alain BKR Date: Thu, 30 Mar 2023 13:35:15 +0200 Subject: [PATCH] add log_normal for all victories --- server/srv_main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/srv_main.c b/server/srv_main.c index 75f26cd41..9e80562d7 100644 --- a/server/srv_main.c +++ b/server/srv_main.c @@ -380,6 +380,7 @@ bool check_for_game_over(void) /* TRANS: There can be several winners listed */ _("Scenario victory to %s."), astr_str(&str)); astr_free(&str); + log_normal(_("Scenario victory to %s."), astr_str(&str)); return TRUE; } astr_free(&str); @@ -445,6 +446,7 @@ bool check_for_game_over(void) player_list_iterate(members, pplayer) { pplayer->is_winner = TRUE; } player_list_iterate_end; + log_normal(_("Team victory to %s."), team_name_translation(pteam)); return TRUE; } } teams_iterate_end; @@ -497,6 +499,7 @@ bool check_for_game_over(void) notify_conn(game.est_connections, NULL, E_GAME_END, ftc_server, /* TRANS: There can be several winners listed */ _("Allied victory to %s."), astr_str(&str)); + log_normal(_("Allied victory to %s."), astr_str(&str)); astr_free(&str); player_list_destroy(winner_list); return TRUE; @@ -523,6 +526,7 @@ bool check_for_game_over(void) if (found) { notify_conn(game.est_connections, NULL, E_GAME_END, ftc_server, _("Game ended in conquest victory for %s."), player_name(victor)); + log_normal(_("Game ended in conquest victory for %s."), player_name(victor)); victor->is_winner = TRUE; return TRUE; } @@ -554,6 +558,8 @@ bool check_for_game_over(void) notify_conn(game.est_connections, NULL, E_GAME_END, ftc_server, _("Game ended in cultural domination victory for %s."), player_name(best)); + log_normal(_("Game ended in cultural domination victory for %s."), + player_name(best)); best->is_winner = TRUE; return TRUE; @@ -564,12 +570,15 @@ bool check_for_game_over(void) if (game.info.turn > game.server.end_turn) { notify_conn(game.est_connections, NULL, E_GAME_END, ftc_server, _("Game ended as the turn limit was exceeded.")); + log_normal( _("Game ended as the turn limit was exceeded.")); return TRUE; } else if (game.info.turn == game.server.end_turn) { /* Give them a chance to decide to extend the game */ notify_conn(game.est_connections, NULL, E_GAME_END, ftc_server, _("Notice: game will end at the end of this turn due " "to 'endturn' server setting.")); + log_normal(_("Notice: game will end at the end of this turn due " + "to 'endturn' server setting.")); } /* Check for a spacerace win (and notify of imminent arrivals). @@ -627,10 +636,12 @@ bool check_for_game_over(void) player_list_iterate(members, pteammate) { pteammate->is_winner = TRUE; } player_list_iterate_end; + log_normal(_("Team victory to %s."), team_name_translation(pplayer->team)); } else { notify_conn(NULL, NULL, E_GAME_END, ftc_server, - _("Game ended in victory for %s."), player_name(pplayer)); + _("Game ended in spacerace victory for %s."), player_name(pplayer)); pplayer->is_winner = TRUE; + log_normal(_("Game ended in spacerace victory for %s."), player_name(pplayer)); } return TRUE; } @@ -658,6 +669,9 @@ bool check_for_game_over(void) _("Notice: the %s spaceship will likely arrive at " "Alpha Centauri next turn."), nation_adjective_for_player(pplayer)); + log_normal(_("Notice: the %s spaceship will likely arrive at " + "Alpha Centauri next turn."), + nation_adjective_for_player(pplayer)); } } -- 2.34.1