From 1938f239e6ae5776903e125d6ab72abb6de56a5c Mon Sep 17 00:00:00 2001 From: Jage9 Date: Tue, 24 Feb 2026 21:24:31 -0500 Subject: [PATCH] Set new radio default emit range to 10 --- client/public/version.js | 2 +- docs/item-schema.md | 6 +++--- docs/item-types.md | 4 ++-- server/app/items/types/radio_station/definition.py | 4 ++-- server/app/items/types/radio_station/validator.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/public/version.js b/client/public/version.js index 13e9b05..75efdcc 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -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"; diff --git a/docs/item-schema.md b/docs/item-schema.md index d874637..a2e63f1 100644 --- a/docs/item-schema.md +++ b/docs/item-schema.md @@ -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` diff --git a/docs/item-types.md b/docs/item-types.md index b46b4a0..22c95ed 100644 --- a/docs/item-types.md +++ b/docs/item-types.md @@ -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 diff --git a/server/app/items/types/radio_station/definition.py b/server/app/items/types/radio_station/definition.py index 8662e9c..33170a9 100644 --- a/server/app/items/types/radio_station/definition.py +++ b/server/app/items/types/radio_station/definition.py @@ -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", diff --git a/server/app/items/types/radio_station/validator.py b/server/app/items/types/radio_station/validator.py index 55b671c..4c24e61 100644 --- a/server/app/items/types/radio_station/validator.py +++ b/server/app/items/types/radio_station/validator.py @@ -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):