Make radio emit range editable (5-20)

This commit is contained in:
Jage9
2026-02-21 20:31:34 -05:00
parent 127a3b285c
commit 4ddb8ee75f
8 changed files with 59 additions and 7 deletions

View File

@@ -25,7 +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.
- `emitRange`: global spatial range default per item type (`radio_station=20`, `dice=15`, `wheel=15`, `clock=10`).
- `radio_station` can override this per instance via `params.emitRange` (`5..20`).
- `directional`: global directional attenuation flag per item type (`radio_station=true`, others `false`), not per-instance editable.
## Persisted Item State (`server/runtime/items.json`)
@@ -64,7 +65,8 @@
"volume": 50,
"effect": "off",
"effectValue": 50,
"facing": 0
"facing": 0,
"emitRange": 20
}
```
@@ -76,6 +78,7 @@
- `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`).
- `emitRange`: integer, range `5-20`, default `20`.
### `dice`