Author: mir3x
Date: Mon Jan 16 14:26:06 2017
New Revision: 34861

URL: http://svn.gna.org/viewcvs/freeciv?rev=34861&view=rev
Log:
Added city report columns for culture and history
Submitted by Jacob Nevins <jtn>

See patch #7669


Modified:
    trunk/client/cityrepdata.c

Modified: trunk/client/cityrepdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/cityrepdata.c?rev=34861&r1=34860&r2=34861&view=diff
==============================================================================
--- trunk/client/cityrepdata.c  (original)
+++ trunk/client/cityrepdata.c  Mon Jan 16 14:26:06 2017
@@ -140,6 +140,28 @@
   static char buf[8];
   fc_snprintf(buf, sizeof(buf), "%2d",
               pcity->feel[CITIZEN_HAPPY][FEELING_FINAL]);
+  return buf;
+}
+
+/************************************************************************
+  Returns city culture written to string
+*************************************************************************/
+static const char *cr_entry_culture(const struct city *pcity,
+                                    const void *data)
+{
+  static char buf[8];
+  fc_snprintf(buf, sizeof(buf), "%3d", pcity->client.culture);
+  return buf;
+}
+
+/************************************************************************
+  Returns city history written to string
+*************************************************************************/
+static const char *cr_entry_history(const struct city *pcity,
+                                    const void *data)
+{
+  static char buf[8];
+  fc_snprintf(buf, sizeof(buf), "%3d", pcity->history);
   return buf;
 }
 
@@ -714,6 +736,10 @@
     NULL, FUNC_TAG(luxury) },
   { FALSE, 3, 1, NULL, N_("?Science:S"), N_("Economy: Science"),
     NULL, FUNC_TAG(science) },
+  { FALSE, 3, 1, NULL, N_("?Culture:Clt"), N_("Culture"),
+    NULL, FUNC_TAG(culture) },
+  { FALSE, 3, 1, NULL, N_("?History:Hst"), N_("History"),
+    NULL, FUNC_TAG(history) },
   { 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"),


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

Reply via email to