Author: sveinung Date: Wed Dec 10 13:53:16 2014 New Revision: 27227 URL: http://svn.gna.org/viewcvs/freeciv?rev=27227&view=rev Log: Path finding: Caravan actions can now be limited by source tile terrain.
Since caravan actions now are action enabler controlled it is possible to create a ruleset where it is impossible to do a caravan action from a non native soure tile. See patch #5508 Modified: trunk/common/aicore/pf_tools.c Modified: trunk/common/aicore/pf_tools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/pf_tools.c?rev=27227&r1=27226&r2=27227&view=diff ============================================================================== --- trunk/common/aicore/pf_tools.c (original) +++ trunk/common/aicore/pf_tools.c Wed Dec 10 13:53:16 2014 @@ -134,7 +134,8 @@ return (PF_MS_NATIVE & src_scope || can_attack_from_non_native(param->utype)); - } else if (PF_ACTION_DIPLOMAT == action) { + } else if (PF_ACTION_DIPLOMAT == action + || PF_ACTION_TRADE_ROUTE == action) { /* Don't try to act when inside of a transport over non native terrain * when all actions the unit type can do requires the unit to be on * native terrain. */ @@ -690,6 +691,7 @@ if (utype_has_flag(parameter->utype, UTYF_TRADE_ROUTE)) { parameter->actions |= PF_AA_TRADE_ROUTE; parameter->get_action = pf_get_action; + parameter->is_action_possible = pf_action_possible; } } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits