Made trigger errors more informative

This commit is contained in:
WBHarry 2026-06-21 14:29:26 +02:00
parent 3840f39c97
commit 6202267ddd
2 changed files with 5 additions and 3 deletions

View file

@ -150,11 +150,13 @@ export default class RegisteredTriggers extends Map {
const result = await command(...args);
if (result?.updates?.length) updates.push(...result.updates);
} catch {
const item = await foundry.utils.fromUuid(itemUuid);
const triggerName = game.i18n.localize(triggerData.label);
ui.notifications.error(
console.error(
game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerError', {
trigger: triggerName,
actor: currentActor?.name
actor: currentActor?.name,
item: item?.name ?? '<Missing Item>'
})
);
}