UNPKG

@drincs/pixi-vn-ink

Version:

Pixi'VN gives you the ability to write your own narrative using Ink

24 lines (20 loc) 1.05 kB
import { PixiVNJsonValueSet, PixiVNJsonValueGet } from '@drincs/pixi-vn-json'; type VariableAssignmentVar = { "VAR=": any; "re": true; }; type VariableAssignmentTem = { "temp=": string; }; /** * https://github.com/inkle/ink/blob/master/Documentation/ink_JSON_runtime_format.md#variable-assignment * * Pops a value from the evaluation stack, and assigns it to a named variable, either globally or locally (in a temp, or a passed parameter). The "re" property being set indicates that it's a re-assignment rather than a brand new declaration. * * Examples: * - {"VAR=": "money", "re": true} - Pop a value from the evaluation stack, and assign it to the already-declared global variable money. * - {"temp=": "x"} - Pop a value from the evaluation stack, and assign it to a newly declared temporary variable named x. */ type VariableAssignment = VariableAssignmentVar | VariableAssignmentTem; type MyVariableAssignment = PixiVNJsonValueSet | PixiVNJsonValueGet; export type { MyVariableAssignment, VariableAssignment as default };