For terrain.ruleset, there are [options] and [parameters] sections.
Do most of these still serve useful purposes?  From a quick look at the
code and a bit of testing, I would think they are mostly also handled in
a different way:

[options]

may_road:
    This is also managed per-terrain by the road_time entry: when 0, no
        road may be built.
    This is additionally managed by per-road reqs: one can force roads
        to never be built by creating circular reqs.

may_irrigate:
    This is also managed per-terrain by the irrigation_result value
    This is additionally managed by the Irrig_Possible effect
        (or the Irrig_TF_Possible effect if irrigation would transform)

may_mine:
    This is also managed per-terrain by the mining_result value
    This is additionally managed by the Mining_Possible effect
        (or the Mining_TF_Possible effect if mining would transform)

may_transform:
    This is also managed per-terrain by the transform_result value
    This is additionally managed by the Transform_Possible effect

[parameters]

ocean_reclaim_requirement, land_channel_requirement:
    As these depend on requirements that cannot currently be expressed
(percentage of adjacent tiles), I do not believe they can currently be
removed without more extensive changes (and so they fall outside the
scope of what is proposed here).

road_superhighway_trade_bonus:
    This appears to be used only to store the value in the ruleset and
send ruleset packets continaing the value, but not in any of the code
that actually checks the trade value of a square.  For all the shipping
rulesets that have a "Super Highways", this appears to be managed with
the Output_Per_Tile effect.

pollution_* and fallout_*:
    These seem like they would be better handled by effects.  Something
like:

[effect_pollution_output]
name  = "Output_Per_Tile"
value = -50
reqs  =
    { "type", "name", "range"
      "Special", "Pollution", "Local"
    }

[effect_fallout_output]
name  = "Output_Per_Tile"
value = -50
reqs  =
    { "type", "name", "range"
      "Special", "Fallout", "Local"
    }

    I'd be happy to prepare and test a patch removing all of this (and
thereby simplifying ruleset documentation), but only if there isn't some
reason to keep them that escapes me.

-- 
Emmet HIKORY

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

Reply via email to