Author: mir3x
Date: Sun Jul 24 19:24:00 2016
New Revision: 33313

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

See bug #23624


Modified:
    branches/S2_6/client/cityrepdata.c

Modified: branches/S2_6/client/cityrepdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/cityrepdata.c?rev=33313&r1=33312&r2=33313&view=diff
==============================================================================
--- branches/S2_6/client/cityrepdata.c  (original)
+++ branches/S2_6/client/cityrepdata.c  Sun Jul 24 19:24:00 2016
@@ -615,6 +615,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;
 }
 
@@ -705,6 +716,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