Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1999:
[Freeciv-Dev] Patch: Numbers of cities
Home

[Freeciv-Dev] Patch: Numbers of cities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Patch: Numbers of cities
From: Mattias Andersson <tamasis@xxxxxxxxxxxx>
Date: Wed, 3 Nov 1999 17:05:09 +0100 (CET)

Hello!

Here is a patch that will make the numbers of cities you have, show up in
the infolabel in the gtk-client.

Mattias Andersson
diff -r -u -Xno.freeciv freeciv/client/gui-gtk/mapview.c 
freeciv.arb/client/gui-gtk/mapview.c
--- freeciv/client/gui-gtk/mapview.c    Fri Oct 29 19:20:00 1999
+++ freeciv.arb/client/gui-gtk/mapview.c        Fri Oct 29 19:22:44 1999
@@ -254,13 +254,14 @@
 
   gtk_frame_set_label( GTK_FRAME( main_frame_civ_name ), 
get_nation_name(game.player_ptr->nation) );
 
-  sprintf( buffer, _("Population: %s\nYear: %s\nGold %d\nTax: %d Lux: %d Sci: 
%d"),
+  sprintf( buffer, _("Population: %s\nYear: %s\nGold %d\nTax: %d Lux: %d Sci: 
%d\nNo. of cities %d"),
          int_to_text( civ_population( game.player_ptr ) ),
          textyear( game.year ),
          game.player_ptr->economic.gold,
          game.player_ptr->economic.tax,
          game.player_ptr->economic.luxury,
-         game.player_ptr->economic.science );
+         game.player_ptr->economic.science,
+         city_list_size(&game.player_ptr->cities) );
 
   gtk_set_label(main_label_info, buffer);
 
diff -r -u -Xno.freeciv freeciv/client/packhand.c freeciv.arb/client/packhand.c
--- freeciv/client/packhand.c   Sun Oct 31 10:24:02 1999
+++ freeciv.arb/client/packhand.c       Wed Nov  3 14:26:06 1999
@@ -235,6 +235,7 @@
     unit_list_init(&pcity->units_supported);
     city_list_insert(&game.players[packet->owner].cities, pcity);
     map_set_city(pcity->x, pcity->y, pcity);
+    update_info_label();
     if(pcity->owner==game.player_idx)
       city_report_dialog_update();

[Prev in Thread] Current Thread [Next in Thread]