Summary: Ruleset definition of what roads to show from
Submitted by: cazfi
Submitted on: Wed 22 Feb 2012 03:23:00 AM EET
Priority: 5 - Normal
Status: Ready For Test
Assigned to: None
Discussion Lock: Any
Planned Release: 2.5.0
Current Road + Railroad in specials road system drawing code never shows road
& railroad together. If both are present, only rails are drawn, and roads are
only implied since they are requirement for rails to exist in first place.
We want something similar with gen-roads, one road type "hiding" another.
We could detect situations like one with current default rules where one road
clearly implies another by having it as requirement, but I can think several
use-cases where such an automatic detection would give unsatisfactory results.
For example, ruleset may make it possible to build better road type when tech
becomes available without building worse road first, and having both roads
having no benefit over having only better road. To avoid clutter, modpack
author would probably want to avoid drawing of worse road in cases where its
existence has no effect at all. So I decided that this feature should not be
automatic, but one that ruleset author defines.
As a first step towards that goal this patch adds "hidden_by" roads bitvector
to road type definitions. It's not yet used in drawing code, but this initial
version just generation of tile popup text is touched. Even that is not really
respecting those definitions in ruleset, as road names are still not really
checked from road types in tile, but from specials.
Date: Wed 22 Feb 2012 03:23:00 AM EET Name: RoadHiddenBy.diff Size: 9kB
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list