list.add
Adds a picked entry to a list.
Signature
list.add(ref: ElementRef, key: string, item: ContentRef, offer: ContentOffer): void
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ref | ElementRef | Required | The element it works on, usually self. |
key | string | Required | The name of the list. |
item | ContentRef | Required | The entry the player picked. |
offer | ContentOffer | Required | The choices the pick was made from, written inline. |
Returns
void Nothing.
Example
list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));
