mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
[Fix] Trigger Error Info (#2030)
* Made trigger errors more informative * .
This commit is contained in:
parent
f385982987
commit
0d59e37a80
2 changed files with 6 additions and 3 deletions
|
|
@ -1451,7 +1451,7 @@
|
|||
},
|
||||
"triggerType": "Trigger Type",
|
||||
"triggeringActorType": "Triggering Actor Type",
|
||||
"triggerError": "{trigger} trigger failed for {actor}. It's probably configured wrong."
|
||||
"triggerError": "{trigger} trigger on {item}({itemUuid}) failed for {actor}. It's probably configured wrong."
|
||||
},
|
||||
"WeaponFeature": {
|
||||
"barrier": {
|
||||
|
|
|
|||
|
|
@ -150,11 +150,14 @@ 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>',
|
||||
itemUuid: item?.uuid ?? '<Missing UUID>'
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue