This commit is contained in:
Dapoolp 2025-08-06 18:37:53 +02:00
parent 2554803741
commit 5a7d1d204c
14 changed files with 55 additions and 154 deletions

View file

@ -323,6 +323,20 @@ export default function DHApplicationMixin(Base) {
];
if (usable)
options.unshift({
name: 'DAGGERHEART.GENERAL.damage',
icon: 'fa-solid fa-explosion',
condition: target => {
const doc = getDocFromElementSync(target);
return doc?.system?.attack?.damage.parts.length || doc?.damage?.parts.length;
},
callback: async (target, event) => {
const doc = await getDocFromElement(target),
action = doc?.system?.attack ?? doc;
return action && action.use(event, { byPassRoll: true })
}
});
options.unshift({
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
icon: 'fa-solid fa-burst',
@ -334,7 +348,7 @@ export default function DHApplicationMixin(Base) {
});
if (toChat)
options.unshift({
options.push({
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.sendToChat',
icon: 'fa-solid fa-message',
callback: async target => (await getDocFromElement(target)).toChat(this.document.id)