before main merge

This commit is contained in:
Dapoolp 2025-06-22 22:18:30 +02:00
parent 1695c80388
commit e52d9e4d8c
5 changed files with 14 additions and 94 deletions

View file

@ -50,11 +50,12 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
context.selectedExperiences = this.config.experiences;
context.advantage = this.config.advantage;
/* context.diceOptions = this.diceOptions; */
context.canRoll = true;
if(this.config.costs?.length) {
const updatedCosts = this.config.action.calcCosts(this.config.costs);
context.costs = updatedCosts
context.canRoll = this.config.action.getRealCosts(updatedCosts)?.hasCost;
} else context.canRoll = true;
}
return context;
}

View file

@ -33,6 +33,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
async _prepareContext(_options) {
const context = await super._prepareContext(_options);
context.title = this.config.title;
context.formula = this.config.formula;
return context;
}