Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

spool / CarryEdit

Interface: CarryEdit<K> โ€‹

Defined in: plugins/gui/types.ts:135

Turns a carried GUI into an editor for the item that opens it. The menu drops the output and buttons for its own slots: show holds a locked copy of the item, and the sockets stand for what's on it.

Type Parameters โ€‹

K โ€‹

K extends string

Properties โ€‹

show โ€‹

readonly show: K

Defined in: plugins/gui/types.ts:137

The socket that shows the held item.


slots? โ€‹

readonly optional slots?: Record<string, SocketSlot | ButtonSlot>

Defined in: plugins/gui/types.ts:139

Slots only the carried menu has, in slots the barrel fills or uses for output and buttons.

Methods โ€‹

load() โ€‹

load(ctx, host, held): void

Defined in: plugins/gui/types.ts:141

Fills the sockets from held as the menu opens. Runs as the cart.

Parameters โ€‹

ctx โ€‹

FunctionContext

host โ€‹

GuiHost

held โ€‹

Held

Returns โ€‹

void


save() โ€‹

save(ctx, host, held): void

Defined in: plugins/gui/types.ts:146

Writes the sockets onto held. Runs as the cart every tick it's held, and once on an item swapped into the menu before it's pushed out, so whatever left the sockets also leaves it.

Parameters โ€‹

ctx โ€‹

FunctionContext

host โ€‹

GuiHost

held โ€‹

Held

Returns โ€‹

void

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.