From 6df10025203ccbbc77777ce6d5da78e44c229556 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Tue, 1 Dec 2026 21:26:43 +0100 Subject: [PATCH] Added a info notification when a Damage Reduction Dialog is opened for a user --- lang/en.json | 3 ++- module/documents/actor.mjs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 6c85cc2e9..91b141b0d 100755 --- a/lang/en.json +++ b/lang/en.json @@ -4447,7 +4447,8 @@ "reloadRequired": "The {weapon} must be reloaded to be used!", "partnerRequired": "A partner must be assigned to use this action.", "actorMissing": "The actor {actorName} could not be dealt damage as it no longer exists", - "outdatedModules": "Some of your modules are incompatible and will cause issues with the system. Please disable the following modules: {modules}" + "outdatedModules": "Some of your modules are incompatible and will cause issues with the system. Please disable the following modules: {modules}", + "damageReductionDialogOpened": "The Damage Reduction Dialog was opened for {user}" }, "Progress": { "migrationLabel": "Performing system migration. Please wait and do not close Foundry." diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index cde6fc2d5..45636d180 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -935,6 +935,10 @@ export default class DhActor extends Actor { key: CONFIG.DH.GENERAL.healingTypes.hitPoints.id }; if (this.type === 'character' && !isDirect && hpDamage.value > 0 && this.#canReduceDamage(hpDamage.value, hpDamage.damageTypes)) { + if (this.owner.id !== game.user.id) { + ui.notifications.info(_loc('DAGGERHEART.UI.Notifications.damageReductionDialogOpened', { user: this.owner.name })); + } + const armorSlotResult = await this.owner.query( 'armorSlot', {