Add clock alarm scheduling with formatted alarm time options

This commit is contained in:
Jage9
2026-02-27 02:06:51 -05:00
parent 7eb94b3f12
commit 78be266fcf
9 changed files with 179 additions and 25 deletions

View File

@@ -118,7 +118,9 @@
{
"timeZone": "America/Detroit",
"use24Hour": false,
"topOfHourAnnounce": true
"topOfHourAnnounce": true,
"alarmEnabled": false,
"alarmTime": ""
}
```
@@ -134,6 +136,8 @@
`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`.
- `alarmEnabled`: boolean (or `on/off` in updates), default `false`.
- `alarmTime`: blank when unset; when set, accepts `HH:MM` (24-hour mode) or `H:MM AM/PM` (12-hour mode).
- Global defaults: `useSound=none`, `emitSound=sounds/clock.ogg`.
- Clock speech announcement audio is emitted via `item_clock_announce` packets using `/sounds/clock/el640/*.ogg`.

View File

@@ -102,6 +102,8 @@ This is behavior-focused documentation for item types and their defaults.
- `timeZone="America/Detroit"`
- `use24Hour=false`
- `topOfHourAnnounce=true`
- `alarmEnabled=false`
- `alarmTime=""`
- Global:
- `useSound=none`
- `emitSound=sounds/clock.ogg`
@@ -117,10 +119,13 @@ This is behavior-focused documentation for item types and their defaults.
- `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
- `alarmEnabled`: boolean or on/off style input
- `alarmTime`: `HH:MM` when `use24Hour=true`, otherwise `H:MM AM/PM`
### Audio
- Spoken clock assets live under `client/public/sounds/clock/el640/`.
- Top-of-hour routine (when enabled) uses `hour1.ogg` + time phrase + `hour2.ogg`.
- Alarm routine (when enabled and time matches) uses `announcement.ogg` + time phrase + `alarm.ogg`.
## `widget`

View File

@@ -56,7 +56,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
- `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)
- generated by server for manual clock `use`, top-of-hour auto announce, and alarm 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: