ink_runtime library Null safety

Classes

BoolValue
CallStack
Choice
A generated Choice from the story. A single ChoicePoint in the Story could potentially generate different Choices dynamically dependent on state, so they're separated.
ChoicePoint
Component
Container
ControlCommand
CountFlags
DebugMetadata
DivertTargetValue
Element
EvaluateFunctionTextOutput
ExternalFunctionDef
FloatValue
InkList
The InkList is the underlying type that's used to store an instance of a list in ink. It's not used for the definition of the list, but for a list value that's stored in a variable. Somewhat confusingly, it's backed by a C# Dictionary, and has nothing to do with a C# List!
InkListItem
The underlying type for a list item in ink. It stores the original list definition name as well as the item name, but without the value of the item. When the value is stored, it's stored in a KeyValuePair of InkListItem and int.
IntValue
JsonSerialization
ListValue
NamedContent
Path
RuntimeObject
SearchResult
When looking up content within the story (e.g. in Container.ContentAtPath), the result is generally found, but if the story is modified, then when loading up an old save state, then some old paths may still exist. In this case we try to recover by finding an approximate result by working up the story hierarchy in the path to find the closest valid container. Instead of crashing horribly, we might see some slight oddness in the content, but hopefully it recovers!
Story
A Story is the core class that represents a complete Ink narrative, and manages the evaluation and state of it.
StoryState
All story state information is included in the StoryState class, including global variables, read counts, the pointer to the current point in the story, the call stack (for tunnels, functions, etc), and a few other smaller bits and pieces. You can save the current state using the json serialisation functions ToJson and LoadJson.
StringValue
Tag
Thread
Value<T>
VariableAssignment
The value to be assigned is popped off the evaluation stack, so no need to keep it here
VariablePointerValue
VariableReference
VariablesState
Encompasses all the global variables in an ink Story, and allows binding of a VariableChanged event so that that game code can be notified whenever the global variables change.

Extensions

ValueTypeX

Constants

PARENT_ID → const String
'^'
PATH_NULL → const String
'__________'

Functions

asOrNull<T>(dynamic value) → T?
previousPointerToJson(Pointer pointer) String?

Enums

CommandType
OutputStateChange
ValueType

Typedefs

Action<T> = dynamic Function(T)
ExternalFunction = Object? Function(List<Object> args)
General purpose delegate definition for bound EXTERNAL function definitions from ink. Note that this version isn't necessary if you have a function with three arguments or less - see the overloads of BindExternalFunction.
VariableChanged = void Function(String variableName, RuntimeObject newValue)
VariableObserver = Object Function(String variableName, Object newValue)
Delegate definition for variable observation - see ObserveVariable.