Set new radio default emit range to 10
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Maintainer-controlled web client version.
|
||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||
window.CHGRID_WEB_VERSION = "2026.02.25 R241";
|
||||
window.CHGRID_WEB_VERSION = "2026.02.25 R242";
|
||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
- `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`, `widget=1000`, `piano=1000`), not per-instance editable.
|
||||
- `emitRange`: global spatial range default per item type (`radio_station=20`, `dice=15`, `wheel=15`, `clock=10`, `widget=15`, `piano=15`).
|
||||
- `emitRange`: global spatial range default per item type (`radio_station=10`, `dice=15`, `wheel=15`, `clock=10`, `widget=15`, `piano=15`).
|
||||
- `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`); `widget` can override per instance via `params.directional`.
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
"mediaEffect": "off",
|
||||
"mediaEffectValue": 50,
|
||||
"facing": 0,
|
||||
"emitRange": 20
|
||||
"emitRange": 10
|
||||
}
|
||||
```
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
- `mediaEffectValue`: number, range `0-100`, precision `0.1`.
|
||||
- `facing`: number, range `0-360`, step `1` (used when `directional=true`).
|
||||
- UI visibility: `facing` is shown only when `directional=true` (`visibleWhen` metadata).
|
||||
- `emitRange`: integer, range `5-20`, default `20`.
|
||||
- `emitRange`: integer, range `5-20`, default `10`.
|
||||
|
||||
### `dice`
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `mediaEffect="off"`
|
||||
- `mediaEffectValue=50`
|
||||
- `facing=0`
|
||||
- `emitRange=20`
|
||||
- `emitRange=10`
|
||||
- Global:
|
||||
- `useSound=none`
|
||||
- `emitSound=none`
|
||||
- `useCooldownMs=1000`
|
||||
- `emitRange=20`
|
||||
- `emitRange=10`
|
||||
- `directional=true`
|
||||
|
||||
### Use
|
||||
|
||||
@@ -19,7 +19,7 @@ CAPABILITIES: tuple[str, ...] = ("editable", "carryable", "deletable", "usable")
|
||||
USE_SOUND: str | None = None
|
||||
EMIT_SOUND: str | None = None
|
||||
USE_COOLDOWN_MS = 1000
|
||||
EMIT_RANGE = 20
|
||||
EMIT_RANGE = 10
|
||||
DIRECTIONAL = True
|
||||
DEFAULT_TITLE = "radio"
|
||||
DEFAULT_PARAMS: dict = {
|
||||
@@ -30,7 +30,7 @@ DEFAULT_PARAMS: dict = {
|
||||
"mediaEffect": "off",
|
||||
"mediaEffectValue": 50,
|
||||
"facing": 0,
|
||||
"emitRange": 20,
|
||||
"emitRange": 10,
|
||||
}
|
||||
PARAM_KEYS: tuple[str, ...] = (
|
||||
"streamUrl",
|
||||
|
||||
@@ -69,7 +69,7 @@ def validate_update(item: WorldItem, next_params: dict) -> dict:
|
||||
next_params["facing"] = int(round(facing))
|
||||
|
||||
try:
|
||||
emit_range = int(next_params.get("emitRange", item.params.get("emitRange", 20)))
|
||||
emit_range = int(next_params.get("emitRange", item.params.get("emitRange", 10)))
|
||||
except (TypeError, ValueError) as exc:
|
||||
raise ValueError("emitRange must be an integer between 5 and 20.") from exc
|
||||
if not (5 <= emit_range <= 20):
|
||||
|
||||
Reference in New Issue
Block a user