When true, a line whose exact text has already been shown once this script's lifetime
reveals at once and advances on its own instead of waiting for confirm - common
visual-novel "skip already-read text". A line with choices never skips: those always
wait for a real answer.
Readonlystateevery line completed so far, oldest first
Runs a graph of passages starting at start, following goto commands and
choice jumps until a passage runs out or the script is cancelled.
Re-shows the most recently completed line for review: a player-facing "back" a game
can wire to a button or a scroll gesture. This is read-only - it does not let a past
choice be re-picked or replay any side effect (show/hide/call) around it, only
the words themselves, the bounded and honestly-scoped half of "rollback" this offers.
Resolves to false when there is nothing in history yet.
ProtectedspeakPuts one line in front of the player and resolves with their answer.
Protected rather than private on purpose: this is the seam for a game that presents dialogue its own way (a different box, a voice line, a test harness) without reimplementing the sequencing above.
Optionalspeaker: stringOptionalchoices: Choice[]
Runs a scene.
runresolves when the list is exhausted, so a caller can simply await a conversation and carry on afterwards, which is what makes a cutscene readable at the call site instead of a chain of callbacks.Example