Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] (PR#14443) city walls not visible (effects problem)
Home

[Freeciv-Dev] (PR#14443) city walls not visible (effects problem)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx, per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#14443) city walls not visible (effects problem)
From: "Vasco Alexandre da Silva Costa" <vasco.costa@xxxxxxxxx>
Date: Sun, 20 Nov 2005 11:19:49 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14443 >

This patch removes one user of city_got_citywalls in client/text.c.

As a bonus, city wonders are now displayed in the tile info popup.

Index: client/text.c
===================================================================
--- client/text.c       (revision 11255)
+++ client/text.c       (working copy)
@@ -137,6 +137,7 @@
     /* Look at city owner, not tile owner (the two should be the same, if
      * borders are in use). */
     struct player *owner = city_owner(pcity);
+    bool has_improvements = FALSE;
 
     if (!game.player_ptr || owner == game.player_ptr){
       /* TRANS: "City: Warsaw (Polish)" */
@@ -162,11 +163,20 @@
                      diplo_city_adjectives[ds[owner->player_no].type]);
       }
     }
-    if (city_got_citywalls(pcity)) {
-      /* TRANS: previous lines gave other information about the city. */
-      astr_add(&str, " %s", _("with City Walls"));
-    }
+    impr_type_iterate(i) {
+      if (is_improvement_visible(i) && city_got_building(pcity, i)) {
+       /* TRANS: previous lines gave other information about the city. */
+       if (has_improvements) {
+         astr_add(&str, ", ");
+       } else {
+         astr_add(&str, _(" with "));
+       }
 
+       astr_add(&str, get_improvement_name(i));
+       has_improvements = TRUE;
+      }
+    } impr_type_iterate_end;
+
     if (pfocus_unit) {
       struct city *hcity = find_city_by_id(pfocus_unit->homecity);
 

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