OPX//77
opx_infinityclothing

clothing

Last updated on

Clothing stores, a marker a player stands on to open the appearance module's fitting room.

A store is a marker: the player stands on it, presses E, and the appearance module's fitting room opens with the game's whole clothing catalogue for their body. This module owns the place and the door only: no catalogue, no money, creates nothing. The server checks the player is really at a store before the room's save is allowed. Ships with no stores; operators capture them in game with /opx.clothing.add.

Sideboth
Requiresnone
Optionalappearance (the fitting room), prompts (the key hint row)
Contractclothing v1 — server, client
Configconfig/clothing.lua (shared)
Dataopx77_clothing (captured stores)
  • Without appearance: markers still draw and the key answers clothing.noWardrobe.
  • Without prompts: only the hint row is missing.
  • A player who is down cannot open a store's room; the server ignores the press. The store-list request (opx:net:clothing:ask) is taken once per second per player.

Commands

CommandAccessArgumentsEffect
/opx.clothing.addACL command.opx.clothing.add[key] [label]Captures a store where the caller stands (position and routing bucket read by the server). key 1–48 characters; without one a free storeN is chosen. label defaults to the key, cut at 64. The same key again moves the store. Prints the line to copy into SPOTS.
/opx.clothing.removeACL command.opx.clothing.remove<key>Deletes a captured store. A store from SPOTS is refused: edit the config instead.
/opx.clothing.listACL command.opx.clothing.list—Every store: key, label, position, bucket, and config or captured.

Names come from COMMANDS.

Configuration

config/clothing.lua sets OPX.Config.MODULES.clothing. Shared.

KeyDefaultEffect
enabledtruefalse switches the module off.
USE_RADIUS4.0Flat metres from the store's X and Y within which it can be used. Checked on both sides. The server allows REACH_SLACK (1 m) more.
MARKER{ shape = 'cylinder', style = 'interaction', RADIUS = 2.5 }Shapes: ring, cylinder. Styles: interaction, objective, spawn, danger. RADIUS 0.1–50.
MAX_DISTANCE150.0Metres beyond which a marker is not drawn (1–500).
GROUND_OFFSET0.06Metres the marker is lifted off Z (0–2). A ring at floor height does not draw.
SCAN_MS500Marker and position scan interval.
POLL_MS15000How often the client asks for the store list again, so a bucket change is picked up.
KEY{ ID = 'opx.clothing.use', NAME = 'clothing.key.use', DEFAULT = 'E' }Rebindable key. ID stores the player's rebind; NAME is the label's locale key. DEFAULT = false registers no key.
COMMANDS{ add = 'opx.clothing.add', remove = 'opx.clothing.remove', list = 'opx.clothing.list' }Command names. All three restricted.
SPOTS{}Stores from config: key = { LABEL, X, Y, Z, BUCKET }. Captured stores with the same key override them.
config/clothing.lua — SPOTS, as /opx.clothing.add prints it
SPOTS = {
  store_example = { LABEL = "JINGUJI", X = -1771.79, Y = -77.30, Z = 7.53, BUCKET = 0 },
},

Bad values (non-positive USE_RADIUS, SCAN_MS, POLL_MS, an invalid marker, store or KEY) are logged as [clothing] config: warnings at start.

Refusal codes

Shown as a toast; the code is the locale key.

CodeMeaning
clothing.noSuchStoreThe player is not on a store.
clothing.noWardrobeThe appearance contract is not running.
clothing.wardrobeRefusedThe fitting room refused; {reason} is its code.
error.noPermissionAnother surface holds the keyboard.
clothing.noPosition/opx.clothing.add: the caller's position could not be read.
clothing.captureFailed/opx.clothing.add: the store was invalid or could not be saved.

On this page