Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#12100) show trade routes better
Home

[Freeciv-Dev] (PR#12100) show trade routes better

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12100) show trade routes better
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Feb 2005 15:30:38 -0800
Reply-to: bugs@xxxxxxxxxxx

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

This patch shows trade routes better in the citydlg tooltip text.

After this the "trade routes" tab should definitely be removed.

-jason

? mask-64x32.png
? newgrid.fig
? newgrid.png
Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.58
diff -u -r1.58 citydlg_common.c
--- client/citydlg_common.c     2 Feb 2005 02:44:31 -0000       1.58
+++ client/citydlg_common.c     3 Feb 2005 23:29:37 -0000
@@ -422,10 +422,14 @@
     int routes = 0, i;
 
     for (i = 0; i < NUM_TRADEROUTES; i++) {
-      routes += pcity->trade_value[i];
+      if (pcity->trade[i] != 0 && pcity->trade_value[i] != 0) {
+       struct city *trade_city = find_city_by_id(pcity->trade[i]);
+
+       cat_snprintf(buf, bufsz, _("%+4d : Trade route with %s\n"),
+                    pcity->trade_value[i], trade_city->name);
+      }
     }
     if (routes != 0) {
-      cat_snprintf(buf, bufsz, _("%+4d : Trade routes\n"), routes);
       total += routes;
     }
   } else if (otype == O_GOLD) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12100) show trade routes better, Jason Short <=