Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2005:
[Freeciv-Dev] (PR#8576) popup_info_text doesn't do veterans properly
Home

[Freeciv-Dev] (PR#8576) popup_info_text doesn't do veterans properly

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#8576) popup_info_text doesn't do veterans properly
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Sep 2005 15:38:56 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [jdorje - Fri Apr 23 21:49:38 2004]:
> 
> The popup_info_text function doesn't generate the proper string for 
> veteran units.  It still treats veteran status as a boolean.

Here is a patch for the development version.  I assume 2.0 also has this
bug.

-jason

Index: client/text.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/text.c,v
retrieving revision 1.52
diff -p -u -r1.52 text.c
--- client/text.c       13 Sep 2005 06:53:35 -0000      1.52
+++ client/text.c       13 Sep 2005 17:19:26 -0000
@@ -244,10 +244,12 @@ const char *popup_info_text(struct tile 
     /* TRANS: A is attack power, D is defense power, FP is firepower,
      * HP is hitpoints (current and max). */
     /* FIXME: veteran status isn't handled properly here. */
-    astr_add_line(&str, _("A:%d D:%d FP:%d HP:%d/%d%s"),
+    astr_add_line(&str, _("A:%d D:%d FP:%d HP:%d/%d (%s)"),
                  ptype->attack_strength, 
                  ptype->defense_strength, ptype->firepower, punit->hp, 
-                 ptype->hp, punit->veteran ? _(" V") : "");
+                 ptype->hp,
+                 ptype->veteran[punit->veteran].name);
+
     if (owner == game.player_ptr
        && unit_list_size(ptile->units) >= 2) {
       /* TRANS: "5 more" units on this tile */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8576) popup_info_text doesn't do veterans properly, Jason Short <=