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.
| Side | both |
| Requires | none |
| Optional | appearance (the fitting room), prompts (the key hint row) |
| Contract | clothing v1 — server, client |
| Config | config/clothing.lua (shared) |
| Data | opx77_clothing (captured stores) |
- Without
appearance: markers still draw and the key answersclothing.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
Names come from COMMANDS.
Configuration
config/clothing.lua sets OPX.Config.MODULES.clothing. Shared.
| Key | Default | Effect |
|---|---|---|
enabled | true | false switches the module off. |
USE_RADIUS | 4.0 | Flat 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_DISTANCE | 150.0 | Metres beyond which a marker is not drawn (1–500). |
GROUND_OFFSET | 0.06 | Metres the marker is lifted off Z (0–2). A ring at floor height does not draw. |
SCAN_MS | 500 | Marker and position scan interval. |
POLL_MS | 15000 | How 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. |
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.
| Code | Meaning |
|---|---|
clothing.noSuchStore | The player is not on a store. |
clothing.noWardrobe | The appearance contract is not running. |
clothing.wardrobeRefused | The fitting room refused; {reason} is its code. |
error.noPermission | Another 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. |