mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Feature/201 new roll type (#218)
* Action Roll DiceSet type * Fix * Remove console log * Tmp fix for non consistent resource * fix
This commit is contained in:
parent
22bf348c12
commit
19cc10a3c9
19 changed files with 283 additions and 156 deletions
|
|
@ -79,23 +79,18 @@ export default class DHItem extends foundry.documents.Item {
|
|||
|
||||
async selectActionDialog() {
|
||||
const content = await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/views/actionSelect.hbs',
|
||||
{ actions: this.system.actions }
|
||||
),
|
||||
title = 'Select Action',
|
||||
type = 'div',
|
||||
data = {};
|
||||
return Dialog.prompt({
|
||||
title,
|
||||
// label: title,
|
||||
'systems/daggerheart/templates/views/actionSelect.hbs',
|
||||
{ actions: this.system.actions }
|
||||
),
|
||||
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)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue