Action Roll DiceSet type

This commit is contained in:
Dapoolp 2025-06-29 20:50:38 +02:00
parent b25e1cec78
commit 4ffcd115e7
17 changed files with 256 additions and 134 deletions

View file

@ -104,20 +104,15 @@ export default class DhpItem extends Item {
'systems/daggerheart/templates/views/actionSelect.hbs',
{ actions: this.system.actions }
),
title = 'Select Action',
type = 'div',
data = {};
return Dialog.prompt({
title,
// label: title,
title = 'Select Action';
return foundry.applications.api.DialogV2.prompt({
window: { title },
content,
type,
callback: html => {
const form = html[0].querySelector('form'),
fd = new foundry.applications.ux.FormDataExtended(form);
return this.system.actions.find(a => a._id === fd.object.actionId);
},
rejectClose: false
ok: {
label: title,
callback: (event, button, dialog) => this.system.actions.find(a => a._id === button.form.elements.actionId.value)
}
});
}