Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3446) Report at endgame
Home

[Freeciv-Dev] (PR#3446) Report at endgame

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3446) Report at endgame
From: "andrearo@xxxxxxxxxxxx" <andrearo@xxxxxxxxxxxx>
Date: Sun, 16 Feb 2003 10:07:56 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Hello,
I think that the report at the end of the game could show some
more information about the game... This patch shows every players
Score, number of cities, military  service, number of technologies and
population in the endgame report. More information could be added,
but I think it would crowd the small report-window.

Andreas R.

diff -u -r -Xfreeciv.original/diff_ignore freeciv.original/server/report.c 
freeciv.work/server/report.c
--- freeciv.original/server/report.c    2003-02-14 22:45:25.000000000 +0100
+++ freeciv.work/server/report.c        2003-02-16 18:44:39.000000000 +0100
@@ -1089,20 +1090,38 @@
 
   qsort(size, j, sizeof(struct player_score_entry), secompare);
   buffer[0] = '\0';
+  
+  if(final){
+    for (i = 0; i < j; i++) {
+      cat_snprintf(buffer, sizeof(buffer),
+                _("%2d:%15s %3d%4d %6d %3d %6d000\n"),
+                i + 1, get_nation_name_plural(size[i].player->nation),
+                size[i].value,
+                get_cities(size[i].player),
+                get_mil_service(size[i].player),
+                get_techs(size[i].player),
+                get_population(size[i].player));
+    }
+    free(size);
+    page_conn(&game.game_connections,
+           _("The Greatest Civilizations in the world."),
+           _("Rank  Civilization Score Cities Mil Techs Population"), buffer);
 
-  for (i = 0; i < j; i++) {
-    cat_snprintf(buffer, sizeof(buffer),
-                PL_("%2d: The %s %s scored %d point\n",
-                    "%2d: The %s %s scored %d points\n",
+  } else {       
+    for (i = 0; i < j; i++) {
+      cat_snprintf(buffer, sizeof(buffer),
+                PL_("%2d: The %s %s scored %d point\n",
+                    "%2d: The %s %s scored %d points\n",
                     size[i].value),
                 i + 1, _(greatness[i]),
                 get_nation_name_plural(size[i].player->nation),
                 size[i].value);
-  }
-  free(size);
-  page_conn(&game.game_connections,
-           final ? _("Final Report:") : _("Progress Scores:"),
+    }
+    free(size);
+    page_conn(&game.game_connections,
+           _("Progress Scores:"),
            _("The Greatest Civilizations in the world."), buffer);
+  }
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#3446) Report at endgame, andrearo@xxxxxxxxxxxx <=