Summary: Configurable road move cost
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Tue 15 Nov 2011 01:37:05 AM EET
                Category: general
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0



This patch makes move cost part of road type definition.

One implementation detail someone may disagree is handling of igter. It used
to have (and with default rulesets still has) same move cost as road. It's
even documented that way in the help.
Some of the old code interpreted this so that it's a rule that igter cost
equals road cost, and was implemented so that changes in road cost would
change igter cost also. Other parts interpreted it just a coincidence that
igter cost and road cost have same value, and set igter cost independently
from road cost.
In new code igter always has same hardcoded value (1) as it used to, and it's
not affected by what ruleset sets road cost to. If igter cost is ever made
configurable, it can be set independently - even to same value as road cost.
This also makes gen-road code a lot simpler when there's no need to try to
figure out what road type's move cost igter cost should equal to in each case.


File Attachments:

Date: Tue 15 Nov 2011 01:37:05 AM EET  Name: RoadMoveCost.diff  Size: 15kB  
By: cazfi



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to