Author: cazfi
Date: Wed Feb  4 04:37:19 2015
New Revision: 27963

URL: http://svn.gna.org/viewcvs/freeciv?rev=27963&view=rev
Log:
Check that relevant "_Possible" effect can ever be enabled in the ruleset 
before claiming
in the help that Settler can do some activity.

See patch #5774

Modified:
    branches/S2_6/client/helpdata.c

Modified: branches/S2_6/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/helpdata.c?rev=27963&r1=27962&r2=27963&view=diff
==============================================================================
--- branches/S2_6/client/helpdata.c     (original)
+++ branches/S2_6/client/helpdata.c     Wed Feb  4 04:37:19 2015
@@ -3669,8 +3669,21 @@
   if (utype_has_flag(utype, UTYF_SETTLERS)) {
     /* Roads, rail, mines, irrigation. */
     CATLSTR(buf, bufsz, _("* Can build roads and railroads.\n"));
-    CATLSTR(buf, bufsz, _("* Can build mines on tiles.\n"));
-    CATLSTR(buf, bufsz, _("* Can build irrigation and farmland on tiles.\n"));
+
+    /* TODO: Check also that specific unit fulfills the requirements of the 
effects */
+    if (effect_cumulative_max(EFT_MINING_POSSIBLE) > 0) {
+      CATLSTR(buf, bufsz, _("* Can build mines on tiles.\n"));
+    }
+    if (effect_cumulative_max(EFT_MINING_TF_POSSIBLE) > 0) {
+      CATLSTR(buf, bufsz, _("* Can mine terrain to another.\n"));
+    }
+
+    if (effect_cumulative_max(EFT_IRRIG_POSSIBLE) > 0) {
+      CATLSTR(buf, bufsz, _("* Can build irrigation and farmland on 
tiles.\n"));
+    }
+    if (effect_cumulative_max(EFT_IRRIG_TF_POSSIBLE) > 0) {
+      CATLSTR(buf, bufsz, _("* Can irrigate terrain to another.\n"));
+    }
 
     /* Pollution, fallout. */
     CATLSTR(buf, bufsz, _("* Can clean pollution from tiles.\n"));


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

Reply via email to