[Freeciv-Dev] (PR#3446) Report at endgame
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
The original patch was submitted 2003 Feb 16.
This patch generates an endgame report that includes the players score,
number of cities, military service, number of technologies and population.
The original patch applies (-p1) and works with cvs as of 2003 Aug 29 and
is attached below.
In the discussion the only comment was that instead a more detailed
demographics report should be created. Since noone jumped up to create
that, I propose that this version be applied to cvs since the functionallity
seems useful to me as is.
--
Josh Cogliati
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,
jjc@xxxxxxxxxxxxxxxxxx <=
|
|