mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Feature/allow action healing multiple resources (#437)
* Healing updates * Remove comments
This commit is contained in:
parent
f55698af02
commit
fad64c9a35
21 changed files with 130 additions and 98 deletions
|
|
@ -38,17 +38,15 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
|||
};
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.EFFECTS.ApplyLocations.damageRoll.name');
|
||||
return game.i18n.localize(`DAGGERHEART.EFFECTS.ApplyLocations.${this.config.isHealing ? 'healing' : 'damage'}Roll.name`);
|
||||
}
|
||||
|
||||
async _prepareContext(_options) {
|
||||
const context = await super._prepareContext(_options);
|
||||
context.config = CONFIG.DH;
|
||||
context.title = this.config.title
|
||||
? this.config.title
|
||||
: game.i18n.localize('DAGGERHEART.EFFECTS.ApplyLocations.damageRoll.name');
|
||||
// context.extraFormula = this.config.extraFormula;
|
||||
context.title = this.config.title ?? this.title;
|
||||
context.formula = this.roll.constructFormula(this.config);
|
||||
context.isHealing = this.config.isHealing;
|
||||
context.directDamage = this.config.directDamage;
|
||||
context.selectedRollMode = this.config.selectedRollMode;
|
||||
context.rollModes = Object.entries(CONFIG.Dice.rollModes).map(([action, { label, icon }]) => ({
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// TO DELETE ?
|
||||
|
||||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
export default class DamageSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue