mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
parent
cf571aa2a5
commit
bcedc74bf3
16 changed files with 57 additions and 156 deletions
|
|
@ -7,7 +7,11 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
static DEFAULT_OPTIONS = {
|
||||
classes: ['environment'],
|
||||
position: {
|
||||
width: 500
|
||||
width: 500,
|
||||
height: 725
|
||||
},
|
||||
window: {
|
||||
resizable: true
|
||||
},
|
||||
actions: {},
|
||||
dragDrop: [{ dragSelector: '.action-section .inventory-item', dropSelector: null }]
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue