Files
combat-hud-hub/module.json
Kaysser Taylor b1121651dc v0.2.5: 1Hz tick keeps timer counting when no envelope event fires
Bug: timeSinceStart only updated when an envelope event fired
(combatStart, attack-roll, etc.). If the combat was idle — a
player thinking about their turn, between turns — the timer froze.

Fix: 1Hz self-rescheduling setTimeout in the constructor that
bumps timeSinceStart and triggers a throttled render while
_state.isActive is true. Stopped on unwireHooks (combat end).

TDD: Section O (5 assertions) added BEFORE the fix.
- O.1 initial timeSinceStart reflects _combatStartedAt
- O.2 advances without an envelope event
- O.3 tick interval is ~1s
- O.4 timer does not tick when combat is inactive
- O.5 timer resumes when combat becomes active again

Tests: 65/65 passing in ~2s. Playwright 31/31.
2026-06-22 19:21:30 -04:00

54 lines
2.0 KiB
JSON

{
"id": "combat-hud-hub",
"title": "Combat HUD Hub",
"description": "Foundry VTT v14 module: a generic combat HUD host. Other modules register sections via the public API; the hub ships built-in core sections (round, current turn, per-PC damage, dice streak) that light up when foundry-hooks-lib + battle-focus are present. Soft-deps on foundry-hooks-lib and battle-focus; consumer-registered sections work even when both are missing.",
"version": "0.2.5",
"library": false,
"manifestPlusVersion": "1.2.0",
"authors": [
{
"name": "Kaysser Taylor",
"url": "https://git.homelab.local/kaykayyali"
}
],
"compatibility": {
"minimum": 14,
"verified": 14
},
"relationships": {
"systems": [],
"modules": [
{
"id": "foundry-hooks-lib",
"type": "module",
"manifest": "https://git.homelab.local/kaykayyali/hooks-lib/raw/branch/main/module.json",
"compatibility": {
"minimum": "0.4.0"
}
},
{
"id": "battle-focus",
"type": "module",
"manifest": "https://git.homelab.local/kaykayyali/battle-focus/raw/branch/main/module.json",
"compatibility": {
"minimum": "0.7.0"
}
}
],
"requires": []
},
"esmodules": ["scripts/main.js"],
"styles": ["styles/hud.css"],
"url": "https://git.homelab.local/kaykayyali/combat-hud-hub",
"manifest": "https://git.homelab.local/kaykayyali/combat-hud-hub/raw/branch/main/module.json",
"download": "https://git.homelab.local/kaykayyali/combat-hud-hub/raw/branch/main/combat-hud-hub-0.2.5.zip",
"readme": "https://git.homelab.local/kaykayyali/combat-hud-hub/blob/main/README.md",
"changelog": "https://git.homelab.local/kaykayyali/combat-hud-hub/commits/main",
"bugs": "https://git.homelab.local/kaykayyali/combat-hud-hub/issues",
"license": "https://git.homelab.local/kaykayyali/combat-hud-hub/blob/main/LICENSE",
"socket": false,
"flags": {
"allowBugReporter": true,
"hotReload": { "extensions": [], "paths": [] }
}
}