Follow-up Comment #26, patch #3829 (project freeciv):

    That's the easiest way to implement 1&2, and what was present already in
the patch.  Ruleset sanity checking added to ensure that road integration is
commutative.

    For 3, I'll stick with move_cost being determined by the cost of the
fastest integrating road on the destination, as it is already implemented that
way.  This means the following rules apply for move costs (ignoring
nativity):

a) If there are no roads, move_cost is determined by the destination.
b) If there is a road at the destination, the move cost of this road may be
used iff there is an integrating road at the source.

    This replicates current behaviour with comment-only ruleset changes, and
allows ruleset authors to choose to allow charging Railroad cost for moves
from Road if they desire by causing the roads to integrate (changing the
behaviour of condition (b) above).  Very ambitious ruleset authors could even
define a null road with RMM_NO_BONUS, use lua to place it everywhere on the
map, and have it integrate with everything, so that the destination tile
always controlled movement entirely.  (the RMM_NO_BONUS conditional was moved
for this revision of the patch to enable just this (and avoid asserts when a
bonus road integrates with a no bonus road: apparently some of (4))).

    I've been changing tile_move_cost_ptrs() in many places lately: for my
convenience, the updated patch applies over patch #3886, patch #3897, and a
rebased bug #16383, as I consider all those issues to be more important than
this (or at least more bug-like and less feature-like): I'm happy to rearrange
the order if that is preferred for application to trunk.  Note that bug #16383
does not need changes to unit_move_to_tile_test() for road integration unless
there is a decision to impose a static cost for moves between tiles made
native by differing roads, in which case integrated roads should not be
considered differing roads.

(file #17903)
    _______________________________________________________

Additional Item Attachment:

File name: allow-compatible-roads+rssanity.patch Size:18 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3829>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to