diff --git a/css/mosh.css b/css/mosh.css index 4a39350..989be64 100644 --- a/css/mosh.css +++ b/css/mosh.css @@ -5178,3 +5178,37 @@ p { background: #1a120c; border: 1px solid #8a5a31; } + +/* ========================================== + ACTIVE CONDITIONS SUMMARY (below stats) + ========================================== */ +.sla-active-conditions-summary { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 5px; + padding: 4px 8px; + margin-top: 4px; + background: rgba(180, 0, 0, 0.12); + border: 1px solid #8b0000; + border-radius: 4px; +} + +.sla-conditions-label { + font-size: 0.72em; + font-weight: 700; + color: #ff4444; + letter-spacing: 0.06em; + text-transform: uppercase; +} + +.sla-active-condition { + font-size: 0.78em; + font-weight: 700; + color: #ff4444; + text-shadow: 0 0 4px rgba(255, 68, 68, 0.45); + padding: 1px 6px; + border: 1px solid #8b0000; + border-radius: 3px; + background: rgba(139, 0, 0, 0.2); +} diff --git a/module/mosh.js b/module/mosh.js index 4867f1e..ad34975 100644 --- a/module/mosh.js +++ b/module/mosh.js @@ -278,9 +278,61 @@ Hooks.once("ready", async function () { patchSlaInitiativeSystem(); if (!game.user?.isGM) hideSlaRestrictedSidebarTabs(); + + // GM Conditions Summary — whisper to all GMs every 30 minutes + if (game.user?.isGM) { + setInterval(_sendGMConditionsSummary, 30 * 60 * 1000); + console.log("SLA MOTHERSHIP | GM conditions summary timer started (every 30 minutes)."); + } }); +/** + * Scans all actors for active condition items and whispers a summary to GM(s). + * Fires every 30 minutes when logged in as GM. + */ +function _sendGMConditionsSummary() { + if (!game.user?.isGM) return; + + const rows = []; + for (const actor of game.actors) { + const conditions = actor.items?.filter(i => i.type === "condition") ?? []; + if (conditions.length === 0) continue; + const conditionList = conditions.map(c => { + const sev = c.system?.severity ?? ""; + return `${c.name}${sev ? ` (${sev})` : ""}`; + }).join(", "); + rows.push(`
| ACTOR | +CONDITIONS | +
|---|