drops
deathDropKit's public surface: `setup` picks the style, look, rule, marker and expiry; `takeForDeath` and `giveBack` move items between the local player's inventoryKit bag and a drop; `build` draws a style; `list` and `mine` read the drops in the world; `on` listens to `dropped`,…
drops
deathDropKit's public surface: setup picks the style, look, rule, marker and expiry; takeForDeath and giveBack move items between the local player's inventoryKit bag and a drop; build draws a style; list and mine read the drops in the world; on listens to dropped, recovered, looted and expired. Called by game scripts and by the kit's two components.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2nonstrict
opt(ok: boolean, m: any) → any
| arg | type | description |
|---|---|---|
| ok | boolean | |
| m | any |
_Inv( ) → any
_HK( ) → any
_Nav( ) → any
_Interact( ) → any
_emit(ev: string, ...: ?) → void
| arg | type | description |
|---|---|---|
| ev | string | |
| ... | ? |
on(ev: string, fn: (...any) → void
Listen to an event: dropped(drop), recovered(drop, items), looted(drop, items, byPeer), expired(drop), setup(cfg).
| arg | type | description |
|---|---|---|
| ev | string | |
| fn | (...any |
setup(opts: any?) → void
Choose the style, look, rule, marker, expiry (seconds, 0 = never) and persist (keep drops in the dying player's save, default true). Call on every peer.
| arg | type | description |
|---|---|---|
| opts | any? |
config( ) → any return table
catalogue( ) → any
lookOf(style: string, look: string?) → string
| arg | type | description |
|---|---|---|
| style | string | |
| look | string? |
encode(items: { any }) → string
| arg | type | description |
|---|---|---|
| items | { any } |
decode(s: string) → void
| arg | type | description |
|---|---|---|
| s | string |
takeForDeath(ruleName: string?) → void
What the local player loses under a rule: takes those items out of their bag and returns them as { { id, count } }.
| arg | type | description |
|---|---|---|
| ruleName | string? |
scan(area: string, n: number) → void
| arg | type | description |
|---|---|---|
| area | string | |
| n | number |
giveBack(items: { any }) → number
Give items to the local player (what recovering a drop does).
| arg | type | description |
|---|---|---|
| items | { any } |
_material(c: { number }) → any
| arg | type | description |
|---|---|---|
| c | { number } |
build(parent: any, style: string, look: string?) → void
Build a style's parts under `parent` (local, temporary children). Returns the spawned parts.
| arg | type | description |
|---|---|---|
| parent | any | |
| style | string | |
| look | string? |
_register(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
_unregister(c: any) → void
| arg | type | description |
|---|---|---|
| c | any |
list( ) → void
Every drop on this machine: { { id, owner, ownerName, style, items, x, y, z } }.
myId( ) → string
The local player's stable id (their saveKit / runtime_data identity), the same after a reconnect, a rejoin or a restart; "peer:<id>" for a guest with none.
mine( ) → void
The local player's own drops.
opt2(ok: boolean, m: any) → any
| arg | type | description |
|---|---|---|
| ok | boolean | |
| m | any |
_Sensor( ) → any
dropInReach( ) → boolean
Whether the local player stands within prompt range of a drop they may take (what makes the drop win focus).
_isDropId(id: string) → boolean
| arg | type | description |
|---|---|---|
| id | string |
_installFocus( ) → boolean
Make drops win interactKit's focus: while the local player is in reach of a drop they may take, every other usable thing reads as unavailable to them, so the prompt and E go to the drop. interactKit has no priority field; its HUD focuses the thing looked at, then the nearest, among the available ones.
statusOf(id: string, peer: number) → void
| arg | type | description |
|---|---|---|
| id | string | |
| peer | number |
_Save( ) → any
store( ) → any
ready( ) → void
get(k: ?) → void
| arg | type | description |
|---|---|---|
| k | ? |
set(k: ?, v: ?) → void
| arg | type | description |
|---|---|---|
| k | ? | |
| v | ? |
record(r: any) → any
A drop's save record, checked and normalised: { id, style, look, marker, items, x, y, z, expireAt, anyone, ownerName }, or nil when it is not one.
| arg | type | description |
|---|---|---|
| r | any |
decodeRecords(v: any) → void
Turn a saved list into records (drops anything malformed), and back.
| arg | type | description |
|---|---|---|
| v | any |
addRecord(list: { any }, rec: any) → void
A list with `rec` added (replacing a record with the same id).
| arg | type | description |
|---|---|---|
| list | { any } | |
| rec | any |
removeRecord(list: { any }, id: string) → void
A list without the record `id`.
| arg | type | description |
|---|---|---|
| list | { any } | |
| id | string |
saved( ) → void
The local player's saved drops, still waiting to be picked up: { { id, style, look, marker, items, x, y, z, expireAt, anyone, ownerName } }.
writeSaved(list: { any }, tries: number?) → void
| arg | type | description |
|---|---|---|
| list | { any } | |
| tries | number? |
_remember(rec: any) → void
| arg | type | description |
|---|---|---|
| rec | any |
_forget(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
newKey( ) → string
A new stable key for a drop.
isPresent(key: string) → boolean
Whether the drop `key` is already in the world on this machine.
| arg | type | description |
|---|---|---|
| key | string |
spawnDrop(rec: any) → any
Spawn a drop (synced, owned by this machine) from a record. Returns the entity.
| arg | type | description |
|---|---|---|
| rec | any |
_rebind(key: string) → void
Ask the drop `key` already in the world to be the local player's again under this peer id (they came back after a reconnect, a rejoin or a restart). The drop's holder checks the stable id.
| arg | type | description |
|---|---|---|
| key | string |
restore(spawn: ((any) → void
Put back every saved drop that is not already in the world (and forget expired ones). `spawn` replaces M.spawnDrop (tests). Returns the keys spawned.
| arg | type | description |
|---|---|---|
| spawn | ((any |
saveReady( ) → boolean
Whether saved drops can be read yet (saveKit has loaded this player's save).
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.