[Freeciv-Dev] popup message for cities (PR#6229)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
When playing without borders, the popup message will be even buggier:
there will be no entry at all for the city!
And what's with the inconsistent spacing?
jason
Index: client/mapctrl_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapctrl_common.c,v
retrieving revision 1.15
diff -u -r1.15 mapctrl_common.c
--- client/mapctrl_common.c 2003/09/19 12:39:37 1.15
+++ client/mapctrl_common.c 2003/09/22 13:44:26
@@ -298,14 +298,26 @@
}
}
if (pcity) {
- my_snprintf(buf, sizeof(buf), _("\nCity: %s(%s,%s)"), pcity->name,
- get_nation_name(city_owner(pcity)->nation),
+ /* Look at city owner, not tile owner (the two should be the same, if
+ * borders are in use). */
+ struct player *owner = city_owner(pcity);
+
+ if (owner == game.player_ptr){
+ /* TRANS: "\nCity: <name> (<nation>)" */
+ my_snprintf(buf, sizeof(buf), _("\nCity: %s (%s)"), pcity->name,
+ get_nation_name(owner->nation));
+ sz_strlcat(out, buf);
+ } else if (owner) {
+ /* TRANS: "\nCity: <name> (<nation>,<diplomatic_state>)" */
+ my_snprintf(buf, sizeof(buf), _("\nCity: %s (%s,%s)"), pcity->name,
+ get_nation_name(owner->nation),
diplo_adjectives[game.player_ptr->
-
diplstates[city_owner(pcity)->player_no].type]);
+ diplstates[owner->player_no].type]);
sz_strlcat(out, buf);
- if (city_got_citywalls(pcity)) {
- sz_strlcat(out, _(" with City Walls"));
- }
+ }
+ if (city_got_citywalls(pcity)) {
+ sz_strlcat(out, _(" with City Walls"));
+ }
}
if (get_tile_infrastructure_set(ptile)) {
my_snprintf(buf, sizeof(buf), _("\nInfrastructure: %s"),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] popup message for cities (PR#6229),
Jason Short <=
|
|