Roadtypes + Tramtypes
I don’t want to spec the UI for this, but I’d envisage:
• splitting the buttons on main toolbar, so trams have their own button
• xor just put an explicit divider in the list of roadtypes / tramtypes (simpler)
One roadtype per tile.
• roadtypes use the road vehicle movement code.
• road vehicles can use drive-in stops (if not articulated)
• road vehicles can reverse on any tile
• roadtypes can optionally draw catenary
• roads can be one way
One tramtype per tile
• tramtypes use the tram movement code
• trams can only use drivethrought stops
• trams can only reverse where a loop is provided
• tramtypes can optionally draw catenary
• tram tracks cannot be one way
Vars on the tile (don’t check neighbouring tiles, there should be no need)
• roadtype (or none)
• tramtype (or none)
Callbacks and/or matching props:
• allow building [roadtype | tramtype] on this tile, returns [allow | disallow]
• draw catenary
• allow towns to extend along tiles of this type
Tramtype will always be drawn above the roadtype.
Where both types draw catenary, OpenTTD will draw all the catenary. If authors don’t like this, they should detect other types by label and special case catenary accordingly.
Power is determined by the mapping of type label + vehicle (there is no special bit for ‘tile is powered’).