Appearance
twine / ItemParts
Interface: ItemParts โ
Defined in: twine/src/item/types.ts:111
An item's registered pieces, from itemOf.
Properties โ
give โ
readonlygive:FunctionRef
Defined in: twine/src/item/types.ts:115
The public <name>/give function.
item โ
readonlyitem:ItemValue
Defined in: twine/src/item/types.ts:113
The item. A fresh copy each read, since items change in place.
mod โ
readonlymod:ModParts
Defined in: twine/src/item/types.ts:121
For an upgrade: what it installs. Throws for anything else.
mods โ
readonlymods:Mods
Defined in: twine/src/item/types.ts:119
The upgrades it takes; a bench's are its item's. Throws for an item that takes none.
Methods โ
holders() โ
holders():
Selector
Defined in: twine/src/item/types.ts:117
Players holding the item. A fresh selector each call.
Returns โ
Selector
variant() โ
variant(
key):VariantParts
Defined in: twine/src/item/types.ts:123
The variant under key. Throws for a key it doesn't have.
Parameters โ
key โ
string | number