Add directional emit model and per-type emit range defaults
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
- `emitSound`: optional continuously-looping spatial sound emitted from the item on the grid; global item field and not user-editable in V1.
|
||||
- `capabilities`, `useSound`, and `emitSound` are derived from global item-type definitions at runtime (not stored per-instance in persisted state).
|
||||
- `useCooldownMs`: global per item type (`radio_station=1000`, `dice=1000`, `wheel=4000`, `clock=1000`), not per-instance editable.
|
||||
- `emitRange`: global spatial range per item type (`radio_station=20`, `dice=15`, `wheel=15`, `clock=10`), not per-instance editable.
|
||||
- `directional`: global directional attenuation flag per item type (`radio_station=true`, others `false`), not per-instance editable.
|
||||
|
||||
## Persisted Item State (`server/runtime/items.json`)
|
||||
|
||||
@@ -61,7 +63,8 @@
|
||||
"channel": "stereo",
|
||||
"volume": 50,
|
||||
"effect": "off",
|
||||
"effectValue": 50
|
||||
"effectValue": 50,
|
||||
"facing": 0
|
||||
}
|
||||
```
|
||||
|
||||
@@ -72,6 +75,7 @@
|
||||
- `channel`: one of `stereo | mono | left | right`, default `stereo`.
|
||||
- `effect`: one of `reverb | echo | flanger | high_pass | low_pass | off`, default `off`.
|
||||
- `effectValue`: number, range `0-100`, precision `0.1`.
|
||||
- `facing`: number, range `0-360`, precision `0.1` (used when `directional=true`).
|
||||
|
||||
### `dice`
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `useSound`
|
||||
- `emitSound`
|
||||
- `useCooldownMs` (from item catalog)
|
||||
- `emitRange` (spatial range in squares)
|
||||
- `directional` (directional attenuation enabled)
|
||||
- Instance fields are persisted in `server/runtime/items.json`.
|
||||
|
||||
## `radio_station`
|
||||
@@ -23,10 +25,13 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `volume=50`
|
||||
- `effect="off"`
|
||||
- `effectValue=50`
|
||||
- `facing=0`
|
||||
- Global:
|
||||
- `useSound=none`
|
||||
- `emitSound=none`
|
||||
- `useCooldownMs=1000`
|
||||
- `emitRange=20`
|
||||
- `directional=true`
|
||||
|
||||
### Use
|
||||
- `use` toggles `enabled` on/off and broadcasts chat status.
|
||||
@@ -36,6 +41,7 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `volume`: integer `0..100`
|
||||
- `effect`: `reverb | echo | flanger | high_pass | low_pass | off`
|
||||
- `effectValue`: number `0..100` with `0.1` precision
|
||||
- `facing`: number `0..360` with `0.1` precision
|
||||
|
||||
## `dice`
|
||||
|
||||
@@ -48,6 +54,8 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `useSound=sounds/roll.ogg`
|
||||
- `emitSound=none`
|
||||
- `useCooldownMs=1000`
|
||||
- `emitRange=15`
|
||||
- `directional=false`
|
||||
|
||||
### Use
|
||||
- Rolls `number` dice with `sides` sides and reports values + total.
|
||||
@@ -66,6 +74,8 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `useSound=sounds/spin.ogg`
|
||||
- `emitSound=none`
|
||||
- `useCooldownMs=4000`
|
||||
- `emitRange=15`
|
||||
- `directional=false`
|
||||
|
||||
### Use
|
||||
- Announces spin immediately.
|
||||
@@ -88,6 +98,8 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `useSound=none`
|
||||
- `emitSound=sounds/clock.ogg`
|
||||
- `useCooldownMs=1000`
|
||||
- `emitRange=10`
|
||||
- `directional=false`
|
||||
|
||||
### Use
|
||||
- Reports current time from item timezone and format.
|
||||
|
||||
Reference in New Issue
Block a user