[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]
<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);
- [Freeciv-Dev] Re: (PR#14628) City walls gone, Jason Short, 2005/11/17
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/18
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Per I. Mathisen, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/19
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] (PR#14443) city walls not visible (effects problem),
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Vasco Alexandre da Silva Costa, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] Re: (PR#14443) city walls not visible (effects problem), Jason Short, 2005/11/20
- [Freeciv-Dev] (PR#14443) effects queries give useless results when not passed appropriate parameters, Jason Short, 2005/11/21
|
|