editList
Call Signature
Section titled “Call Signature”editList<
Item,Owner>(writer,entity,field):ListEditor<Item>
entity’s list field, to edit: each change is checked against the
list’s most and recorded, so the send carries one push as one
operation. The first write copies the list, so a reader that kept it
sees it as it was. The writer is as editTrait’s.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Item |
Owner extends UnstreamedTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
SetupWriter | EntityAuthority | SystemStep |
entity |
Entity |
field |
ListField<Item, Owner> |
Returns
Section titled “Returns”ListEditor<Item>
Example
Section titled “Example”editList(step, bag, BagTrait.fields.slots).push({ item: "torch", count: 3 });Call Signature
Section titled “Call Signature”editList<
Item,Owner>(writer,entity,field):ListEditor<Item>
entity’s list field, to edit: each change is checked against the
list’s most and recorded, so the send carries one push as one
operation. The first write copies the list, so a reader that kept it
sees it as it was. The writer is as editTrait’s.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Item |
Owner extends LocalTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
ViewWriter |
entity |
Entity |
field |
ListField<Item, Owner> |
Returns
Section titled “Returns”ListEditor<Item>
Example
Section titled “Example”editList(step, bag, BagTrait.fields.slots).push({ item: "torch", count: 3 });Call Signature
Section titled “Call Signature”editList<
Item,Owner>(writer,entity,field):ListEditor<Item>
entity’s list field, to edit: each change is checked against the
list’s most and recorded, so the send carries one push as one
operation. The first write copies the list, so a reader that kept it
sees it as it was. The writer is as editTrait’s.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Item |
Owner extends Trait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
SetupWriter | EntityAuthority |
entity |
Entity |
field |
ListField<Item, Owner> |
Returns
Section titled “Returns”ListEditor<Item>
Example
Section titled “Example”editList(step, bag, BagTrait.fields.slots).push({ item: "torch", count: 3 });