Table of Contents

Class SpeechText

Namespace
DialogueDown.Playbook.Speech
Assembly
DialogueDown.Playbook.dll

Reads a run of speech as one line of plain text: the words, with the styling, the nesting, and the markup left behind.

public static class SpeechText
Inheritance
SpeechText
Inherited Members

Remarks

Speech is a list of fragments because showing it is the host's job, and a browser, a terminal, and a game engine each show it differently. Some readers are not showing it to a player at all, though — a test asserting what was said, a table listing a script's lines, a log naming what just played. They want the words, and they all want the same words, so this is the one place that decides what they are.

The reading is lossy on purpose and has no way back. Anything that is not a word a speaker says contributes nothing: a tag describes the line rather than belonging to it, and a command is something the host does rather than something anybody says.

Methods

Of(ImmutableArray<SpeechFragment>)

Reads speech as one line of plain text, naming each query rather than saying what it is worth.

Of(ImmutableArray<SpeechFragment>, Func<string, string>)

Reads speech as one line of plain text, asking answerQuery what each query is worth.

PlaceholderFor(string)

Writes a query as its key in braces, for a reader with no value to put there.