lane_util_serialized¶
Source: base/tealdef/scripts/construction/lane_util_serialized.d.tl
Notes
Types of the lane helper (/scripts/construction/laneutil.lua, LaneUtilSerialized) that turns
generated curve data into lane lists.
LaneUtilSerialized¶
record global base/tealdef/scripts/construction/lane_util_serialized.d.tl:3
global record LaneUtilSerialized
Notes
Lane helper from /scripts/construction/laneutil.lua.
Functions
createLane(curve : {{{number}}}, transportModes : {ConstructionUtilSerialized.TransportMode}, number, number, boolean) : ConstructionUtilSerialized.LaneList base/tealdef/scripts/construction/lane_util_serialized.d.tl:4
Notes
Builds a lane list from curves (each a list of points) for the given transport modes.
| Parameter | Type | Description |
|---|---|---|
curve |
{{{number}}} |
List of curves, each a list of {x, y, z} points: 2 points give a straight lane, 3 a quadratic curve, and 4 (or 3n+1) points cubic segments whose tangents come from the control points. |
transportModes |
{ConstructionUtilSerialized.TransportMode} |
Transport modes allowed on the lane, e.g. {"PERSON"}. |
#3 |
number |
Speed limit of the lane (left unset if nil). |
#4 |
number |
Width written as the third element of every node (0 if nil). |
#5 |
boolean |
Whether the lane can be linked to other lanes (linkable). |
Returns ConstructionUtilSerialized.LaneList: A lane list with nodes, transportModes and the optional speedLimit / linkable.