Archmage.Tuple
A fixed number of values, the type of a tuple field.
Inherits: RefCounted
A tuple has 1 to 7 values. In the config files, it is an object with the keys item0 to item6.
Properties
Section titled “Properties”var items: Array = []The values, of the types of the tuple fields. A value that references a config entry holds the entry.
var item0: Variantitems[0].
var item1: Variantitems[1].
var item2: Variantitems[2].
var item3: Variantitems[3].
var item4: Variantitems[4].
var item5: Variantitems[5].
var item6: Variantitems[6].
Methods
Section titled “Methods”from_json()
Section titled “from_json()”static func from_json(d: Variant, convs: Array[Callable], e: Archmage.ParseError = null, refs: Array[int] = []) -> Archmage.TupleReturns the tuple in d, a parsed JSON object, converting the value at index i with convs[i].call(value, e), or null when d is null. For any other value that is not an object, returns null too and records the type mismatch in e (see Archmage.ParseError.report_mismatch()). When a conversion records an error in e, returns null. The values at the indexes in refs are config IDs: they go to _ref_ids, and items holds null at those indexes until the generated code resolves them.
to_json()
Section titled “to_json()”func to_json() -> DictionaryReturns the tuple as a JSON object. A value that references a config entry is written as its config ID.
size()
Section titled “size()”func size() -> intReturns the number of values.