{% import "partials/condition_node.html" as pred %} {% import "partials/icons.html" as ic %} {# Waypoint conditions of an action that follows vertices: what each vertex is departed on. A vertex has one -- a time (a Trajectory time condition) or any other condition -- or none, and is then passed through on arrival. Each is an ordinary condition tree, drawn and edited with the same pieces as a trigger -- click it for its inspector, add children to a composition in place -- so nothing here knows any condition type. Only *where* it sits is new: a vertex number, the Nth vertex of the list (blank and comment lines are not counted). #} {% macro gate_row(action, gate, index, draft, selected, document) %}
What each vertex is departed on: a time on the trajectory's clock (Trajectory time) or any other condition -- one per vertex -- or, with none, on arrival. The entity waits at the vertex until it holds, checked from when it gets there (in Follow mode from braking distance already, but for the last vertex). After a vertex, it arrives at the next vertex's time if that is still to come, and goes at the card's speed otherwise. Vertex N is the Nth vertex (blank and comment lines are not counted); on the last one, the run ends when its condition holds.
{%- set gates = action.advance_conditions -%} {% if gates|length > 12 %} {# A recording gives every vertex a time: hundreds of rows. #}Every vertex is passed through on arrival.
{% endfor %} {% endif %} {%- set used = gates|map(attribute='vertex')|list -%} {%- set ns = namespace(free=1) -%} {%- for _ in range(used|length + 1) -%}{%- if ns.free in used -%}{%- set ns.free = ns.free + 1 -%}{%- endif -%}{%- endfor -%}