Implemented repeating voice messages that automatically replay at intervals until the condition clears, with danger messages superseding warnings. Changes: - VoiceMessage interface: Added repeatInterval and lastPlayedTime fields - queueMessage(): Now accepts repeatInterval parameter (0 = no repeat) - update(): Implements repeat logic - After sequence completes, checks repeatInterval - Re-queues message with timestamp tracking - Waits for interval to elapse before replaying - clearWarningState(): New method to clear specific warning states - handleStatusChange(): Enhanced logic with prioritization - Clears warning states when resources increase above thresholds - Danger warnings (< 10%): repeat every 2s, clear warning state - Regular warnings (10-30%): repeat every 4s, only if not in danger - Empty warnings: play once, no repeat Behavior: - Fuel 25%: "warning → fuel" repeats every 4s - Fuel drops to 8%: Warning stops, "danger → fuel" repeats every 2s - Fuel recovers to 15%: Danger stops, "warning → fuel" resumes - Fuel recovers to 35%: All warnings stop - Refueling/repairing clears states, allows re-triggering 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| docs | ||
| public | ||
| scripts | ||
| server | ||
| src | ||
| themes/default | ||
| .gitignore | ||
| CLAUDE.md | ||
| CONTROLLER_THRUST.md | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||