Add spoken spatial clock announcements with top-of-hour mode
This commit is contained in:
@@ -117,7 +117,8 @@
|
||||
```json
|
||||
{
|
||||
"timeZone": "America/Detroit",
|
||||
"use24Hour": false
|
||||
"use24Hour": false,
|
||||
"topOfHourAnnounce": true
|
||||
}
|
||||
```
|
||||
|
||||
@@ -132,7 +133,9 @@
|
||||
`Europe/London`, `Europe/Moscow`, `Pacific/Apia`, `Pacific/Auckland`, `Pacific/Chatham`,
|
||||
`Pacific/Honolulu`, `Pacific/Kiritimati`, `Pacific/Noumea`, `Pacific/Pago_Pago`, `UTC`.
|
||||
- `use24Hour`: boolean (or `on/off` in updates), default `false`.
|
||||
- `topOfHourAnnounce`: boolean (or `on/off` in updates), default `true`.
|
||||
- Global defaults: `useSound=none`, `emitSound=sounds/clock.ogg`.
|
||||
- Clock speech announcement audio is emitted via `item_clock_announce` packets using `/sounds/clock/el640/*.ogg`.
|
||||
|
||||
### `widget`
|
||||
|
||||
@@ -241,6 +244,18 @@
|
||||
}
|
||||
```
|
||||
|
||||
- `item_clock_announce`:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "item_clock_announce",
|
||||
"itemId": "item-id",
|
||||
"sounds": ["/sounds/clock/el640/its.ogg", "/sounds/clock/el640/2.ogg", "/sounds/clock/el640/PM.ogg"],
|
||||
"x": 12,
|
||||
"y": 8
|
||||
}
|
||||
```
|
||||
|
||||
- `item_piano_note`:
|
||||
|
||||
```json
|
||||
|
||||
@@ -101,6 +101,7 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- Params:
|
||||
- `timeZone="America/Detroit"`
|
||||
- `use24Hour=false`
|
||||
- `topOfHourAnnounce=true`
|
||||
- Global:
|
||||
- `useSound=none`
|
||||
- `emitSound=sounds/clock.ogg`
|
||||
@@ -109,11 +110,17 @@ This is behavior-focused documentation for item types and their defaults.
|
||||
- `directional=false`
|
||||
|
||||
### Use
|
||||
- Reports current time from item timezone and format.
|
||||
- Broadcasts a spoken EL640-style time announcement as spatial audio from the clock position.
|
||||
- No text chat line is emitted for clock `use`.
|
||||
|
||||
### Validation
|
||||
- `timeZone`: one of `CLOCK_TIME_ZONE_OPTIONS` in `server/app/item_catalog.py`
|
||||
- `use24Hour`: boolean or on/off style input
|
||||
- `topOfHourAnnounce`: boolean or on/off style input
|
||||
|
||||
### Audio
|
||||
- Spoken clock assets live under `client/public/sounds/clock/el640/`.
|
||||
- Top-of-hour routine (when enabled) uses `hour1.ogg` + time phrase + `hour2.ogg`.
|
||||
|
||||
## `widget`
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
|
||||
- `item_remove`: item deletion.
|
||||
- `item_action_result`: action success/failure and user-facing message.
|
||||
- `item_use_sound`: spatial one-shot sound on successful item use (if `useSound` configured).
|
||||
- `item_clock_announce`: ordered list of clock speech samples to play sequentially as spatial audio.
|
||||
- `item_piano_note`: broadcast piano note on/off with resolved instrument/envelope/spatial params.
|
||||
- `item_piano_status`: structured piano mode/record/playback state events for client runtime control.
|
||||
|
||||
@@ -50,6 +51,11 @@ This is a behavior guide for packet semantics beyond raw schemas.
|
||||
- `item_piano_status` carries machine-readable piano events (`use_mode_entered`, record/playback transitions).
|
||||
- `item_use_sound` contains absolute item world coordinates (`x`, `y`) and sound path.
|
||||
- For carried items, source coordinates resolve to the carrier's current position.
|
||||
- `item_clock_announce` contains:
|
||||
- `itemId`
|
||||
- `sounds`: ordered sample URLs (EL640 phrase parts)
|
||||
- absolute source coordinates `x`, `y`
|
||||
- generated by server for manual clock `use` and top-of-hour auto announce (when enabled)
|
||||
- `teleport_complete` contains absolute player world coordinates (`x`, `y`) at teleport landing.
|
||||
- Radio metadata (`params.stationName`, `params.nowPlaying`) is server-managed and delivered through normal `item_upsert` updates.
|
||||
- `item_piano_note` contains:
|
||||
|
||||
Reference in New Issue
Block a user