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

@ -276,7 +276,8 @@ export default class DhpActor extends Actor {
async diceRoll(config) {
config.source = {...(config.source ?? {}), actor: this.uuid};
config.data = this.getRollData();
return await this.rollClass.build(config);
const rollClass = config.roll.lite ? CONFIG.Dice.daggerheart['DHRoll'] : this.rollClass;
return await rollClass.build(config);
}
get rollClass() {

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)
}
});
}