Skip to main content

Server Exports · Benches

Server Exports · Benches

exports['nord_crafting']:GetFixedBenches()
exports['nord_crafting']:GetPlacedBenches()
exports['nord_crafting']:GetAllBenches()
exports['nord_crafting']:GetBench('fixed_1')
exports['nord_crafting']:ReloadBenches()

Add a placed bench:

exports['nord_crafting']:AddPlacedBench(ownerCid, payload, def)

Access/opening helpers:

local payload, err = exports['nord_crafting']:GetBenchOpenPayload(source, 'fixed_1')
local allowed, reason = exports['nord_crafting']:CanPlayerAccessBench(source, 'fixed_1')
local ok, reason = exports['nord_crafting']:OpenBenchForPlayer(source, 'fixed_1')

OpenBenchForPlayer performs the normal payload/access path and then opens the bench on the target client.