rmp::DialogueValue
class DialogueValue
A value of the Yarn language: a number, a string or a bool.
Kind
enum class Kind : std::uint8_t
Which of Yarn's three types it holds.
| Value | Means | |
|---|---|---|
NUMBER | A number; Yarn has one kind, a float | |
STRING | A piece of text | |
BOOL | True or false |
DialogueValue
DialogueValue(float number)
DialogueValue(int number)
DialogueValue(double number)
DialogueValue(bool value)
DialogueValue(std::string text)
template <std::size_t N>
// NOLINTNEXTLINE(google-explicit-con
Each one implicit, so out = 3; or set_variable("$met", true) reads as Yarn does.
DialogueValue: A number
DialogueValue: A number, as a float
DialogueValue: A number, as a float
DialogueValue: A bool
DialogueValue: A string
kind
Kind kind() const
Which type it holds
as_number
float as_number() const
A string read as a number; a bool 1 or 0
as_bool
bool as_bool() const
A number not 0; a string "true"
as_string
std::string as_string() const
As a line shows it: 2, 2.5, True