| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Freeciv
Revision: 15194
Author: cazfi
Date: 04 Sep 2008 08:21:00
Changes:Fixed a problem that tile info popup did not list bases if it was
only infrastructure in that tile.
See #40473
Files:| ... | ...@@ -221,6 +221,14 @@ | |
| 221 | 221 | } unit_list_iterate_end; |
| 222 | 222 | } |
| 223 | 223 | infra = get_tile_infrastructure_set(ptile, &infracount); |
| 224 | if (infracount == 0) { | |
| 225 | base_type_iterate(pbase) { | |
| 226 | if (BV_ISSET(ptile->bases, base_index(pbase))) { | |
| 227 | infracount = 1; | |
| 228 | break; | |
| 229 | } | |
| 230 | } base_type_iterate_end; | |
| 231 | } | |
| 224 | 232 | if (infracount > 0) { |
| 225 | 233 | astr_add_line(&str, _("Infrastructure: %s"), |
| 226 | 234 | get_infrastructure_text(ptile->special, ptile->bases)); |
| ... | ...@@ -766,6 +774,14 @@ | |
| 766 | 774 | get_tile_infrastructure_set(punit->tile, &infracount); |
| 767 | 775 | |
| 768 | 776 | astr_add_line(&str, "%s", tile_get_info_text(punit->tile, linebreaks)); |
| 777 | if (infracount == 0) { | |
| 778 | base_type_iterate(pbase) { | |
| 779 | if (BV_ISSET(punit->tile->bases, base_index(pbase))) { | |
| 780 | infracount = 1; | |
| 781 | break; | |
| 782 | } | |
| 783 | } base_type_iterate_end; | |
| 784 | } | |
| 769 | 785 | if (infracount > 0) { |
| 770 | 786 | astr_add_line(&str, "%s", get_infrastructure_text(infrastructure, punit->tile->bases)); |
| 771 | 787 | } else { |