opx_infinityclothing
Client
Last updated on
The clothing contract on the client — the store underfoot and the key's door.
local clothing = OPX.Api.Get('clothing')From client code inside opx_infinity. Every function answers a Result.
State
clothing.State()Returns
Result{ spots, markers, nearest, shown, key }spots,markers: counts of stores and drawn markers.nearest: key of the store underfoot.shown: whether the hint row is up.key: the key label.
Nearest
The store the player stands on.
clothing.Nearest()Returns
Result{ key, label }— errorclothing.noSuchStore
Spots
The stores this client was sent (its own routing bucket).
clothing.Spots()Returns
Result{ spots = { [key] = store } }
Open
Same as pressing the key: tells the server, then opens the fitting room.
clothing.Open(origin)Parameters
- origin?:
string— echoed assourceon the decision.
Returns
Result— the verdict table; error is a locale key such asclothing.noSuchStore,clothing.noWardrobe,clothing.wardrobeRefused,error.noPermission
local opened = clothing.Open('mymodule')
if not opened.ok then print(opened.error) end