Module yarnspinner::runtime
source · Expand description
Types and traits used by the runtime, in particular the Dialogue
struct.
Structs§
- A custom command found in a Yarn file within the
<<
and>>
characters. - A structure that holds several
CompiledProgramAnalyser
s which are used to analyse one or more compiled Yarn programs withDialogue::analyse
. To get the analysis results, callContext::finish_analysis
afterwards. - A result of analysing a compiled Yarn program with [
Dialogue::analyse
]. Created by the [CompiledProgramAnalyser
]s used in the given [Context
]. - Co-ordinates the execution of Yarn programs.
- An option to be presented to the user.
- IETF BCP 47 code. The default is “en-US”.
- A line of dialogue, sent from the
Dialogue
to the game. - Represents a range of text in a marked-up string.
- A simple concrete implementation of
VariableStorage
that keeps all variables in memory. - The identifying number for an option. You should not need to create these yourself, since you get them from
DialogueOption
s. - A basic implementation of
TextProvider
which keeps the text for the base language, i.e. the language the Yarn files are written in, and the text for the currently selected translation in memory.
Enums§
- The severity of a
Diagnosis
, as reported by a [CompiledProgramAnalyser
]. - An event encountered while running
Dialogue::continue_
. A caller is expected to handle these events and act accordingly. - A value associated with a markup name.
Constants§
- The name of the implicitly-generated
character
attribute. - The name of the ‘name’ property, on the implicitly-generated
character
attribute. - The name of the property to use to signify that trailing whitespace should be trimmed if a tag had preceding whitespace or begins the line. This property must be a bool value.
Traits§
- A trait for analysing a compiled Yarn program. Can be used by adding them to a
Context
withContext::add_analyser
and then applied to a compiled Yarn program withDialogue::analyse
. - A trait for providing text to a
Dialogue
. The default implementation isStringTableTextProvider
, which keeps the text for the base language, i.e. the language the Yarn files are written in, and the text for the currently selected translation in memory. - Provides a mechanism for storing and retrieving instances of the
YarnValue
type.