Author: cazfi Date: Wed Feb 4 04:37:13 2015 New Revision: 27962 URL: http://svn.gna.org/viewcvs/freeciv?rev=27962&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: trunk/client/helpdata.c Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=27962&r1=27961&r2=27962&view=diff ============================================================================== --- trunk/client/helpdata.c (original) +++ trunk/client/helpdata.c Wed Feb 4 04:37:13 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