Struct yharnam::Line [−][src]
A line of dialogue, sent from the VirtualMachine
to the game.
When the game receives a Line
, it should do the following things to prepare the line for
presentation to the user.
-
Use the value in the
id
field to look up the appropriate user-facing text in the string table. -
For each of the entries in the
substitutions
field, replace the corresponding placeholder with the entry. That is, the text “{0}
” should be replaced with the value ofsubstitutions[0]
, “{1}
” withsubstitutions[1]
, and so on. -
Use
expand_format_functions
to expand all format functions in the line.
You do not create instances of this struct yourself. They are created by the VirtualMachine
during program execution.
Fields
id: String
substitutions: Vec<String>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Line
impl RefUnwindSafe for Line
impl UnwindSafe for Line
impl UnwindSafe for Line