Set new radio default emit range to 10
This commit is contained in:
@@ -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