OPX//77
opx_infinitycrafting

Client

Last updated on

The crafting contract on the client — open and close a bench's menu.

local crafting = OPX.Api.Get('crafting')

From client code inside opx_infinity. While open, the menu asks the server for a fresh view every REFRESH_MS.

Open

Asks the server for the bench and opens the menu. The server checks everything again.

crafting.Open(benchKey)

Parameters

  • benchKey: string

Returns

  • Result true — errors invalid_bench, no_screen (no menu)
Example
crafting.Open('mymodule:bench')

Close

Closes the menu.

crafting.Close()

Returns

  • Result true

State

crafting.State()

Returns

  • Result { open, bench }

On this page