mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-24 19:39:54 +02:00
Made trigger errors more informative
This commit is contained in:
parent
3840f39c97
commit
6202267ddd
2 changed files with 5 additions and 3 deletions
|
|
@ -1451,7 +1451,7 @@
|
||||||
},
|
},
|
||||||
"triggerType": "Trigger Type",
|
"triggerType": "Trigger Type",
|
||||||
"triggeringActorType": "Triggering Actor Type",
|
"triggeringActorType": "Triggering Actor Type",
|
||||||
"triggerError": "{trigger} trigger failed for {actor}. It's probably configured wrong."
|
"triggerError": "{trigger} trigger on {item} failed for {actor}. It's probably configured wrong."
|
||||||
},
|
},
|
||||||
"WeaponFeature": {
|
"WeaponFeature": {
|
||||||
"barrier": {
|
"barrier": {
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,13 @@ export default class RegisteredTriggers extends Map {
|
||||||
const result = await command(...args);
|
const result = await command(...args);
|
||||||
if (result?.updates?.length) updates.push(...result.updates);
|
if (result?.updates?.length) updates.push(...result.updates);
|
||||||
} catch {
|
} catch {
|
||||||
|
const item = await foundry.utils.fromUuid(itemUuid);
|
||||||
const triggerName = game.i18n.localize(triggerData.label);
|
const triggerName = game.i18n.localize(triggerData.label);
|
||||||
ui.notifications.error(
|
console.error(
|
||||||
game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerError', {
|
game.i18n.format('DAGGERHEART.CONFIG.Triggers.triggerError', {
|
||||||
trigger: triggerName,
|
trigger: triggerName,
|
||||||
actor: currentActor?.name
|
actor: currentActor?.name,
|
||||||
|
item: item?.name ?? '<Missing Item>'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue