[Rework] Fear Tracker (#2097)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

* rework fear tracker application, add static positions to hold the tracker, enhance token and bar display
This commit is contained in:
Murilo Brito 2026-07-21 16:50:03 -03:00 committed by GitHub
parent 26bcc2dddc
commit d50545af4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 457 additions and 112 deletions

View file

@ -1,6 +1,7 @@
import { enrichedDualityRoll } from '../../enrichers/DualityRollEnricher.mjs';
import { enrichedFateRoll, getFateTypeData } from '../../enrichers/FateRollEnricher.mjs';
import { getCommandTarget, rollCommandToJSON } from '../../helpers/utils.mjs';
import FearTracker from './fearTracker.mjs';
export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLog {
constructor(options) {
@ -279,6 +280,11 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
new game.system.api.applications.dialogs.RiskItAllDialog(actor, resourceValue).render({ force: true });
}
_toggleNotifications({ closing = false } = {}) {
super._toggleNotifications(closing)
FearTracker.handleOffSet();
}
async onRollReloadCheck(_event, messageData) {
const message = game.messages.get(messageData._id);
const needsReload = await message.system.action.handleReload?.({ awaitRoll: true });