Author: mir3x
Date: Sun Jul 24 19:24:18 2016
New Revision: 33314

URL: http://svn.gna.org/viewcvs/freeciv?rev=33314&view=rev
Log:
City report - added continent number.
Reported by anonymous.

See bug #23624


Modified:
    trunk/client/cityrepdata.c

Modified: trunk/client/cityrepdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/cityrepdata.c?rev=33314&r1=33313&r2=33314&view=diff
==============================================================================
--- trunk/client/cityrepdata.c  (original)
+++ trunk/client/cityrepdata.c  Sun Jul 24 19:24:18 2016
@@ -613,6 +613,17 @@
     fc_snprintf(buf, sizeof(buf), "%4.1f",
                 (float)city_illness_calc(pcity, NULL, NULL, NULL, NULL)/10.0);
   }
+  return buf;
+}
+
+/************************************************************************
+  Returns number of continent
+*************************************************************************/
+static const char *cr_entry_continent(const struct city *pcity, 
+                                   const void *data)
+{
+  static char buf[8];
+  fc_snprintf(buf, sizeof(buf), "%3d", pcity->tile->continent);
   return buf;
 }
 
@@ -703,6 +714,8 @@
     NULL, FUNC_TAG(luxury) },
   { FALSE, 3, 1, NULL, N_("?Science:S"), N_("Economy: Science"),
     NULL, FUNC_TAG(science) },
+  { FALSE, 3, 1, NULL, N_("?Continent:C"), N_("Continent number"),
+    NULL, FUNC_TAG(continent) },
   { FALSE,  1, 1, N_("?number_trade_routes:n"), N_("?number_trade_routes:R"),
                   N_("Number (and total value) of trade routes"),
     NULL, FUNC_TAG(trade_routes) },


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to