mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Made the action config title not get changed in d20rolldialog if it's not a trait roll
This commit is contained in:
parent
357b94c128
commit
90a98a3248
2 changed files with 8 additions and 4 deletions
|
|
@ -165,9 +165,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
}
|
}
|
||||||
if (rest.hasOwnProperty('trait')) {
|
if (rest.hasOwnProperty('trait')) {
|
||||||
this.config.roll.trait = rest.trait;
|
this.config.roll.trait = rest.trait;
|
||||||
this.config.title = game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
|
if (!this.config.source.item)
|
||||||
ability: game.i18n.localize(abilities[this.config.roll.trait]?.label)
|
this.config.title = game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle', {
|
||||||
});
|
ability: game.i18n.localize(abilities[this.config.roll.trait]?.label)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
this.config.extraFormula = rest.extraFormula;
|
this.config.extraFormula = rest.extraFormula;
|
||||||
this.render();
|
this.render();
|
||||||
|
|
|
||||||
|
|
@ -240,9 +240,12 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
* @returns {object}
|
* @returns {object}
|
||||||
*/
|
*/
|
||||||
prepareBaseConfig(event) {
|
prepareBaseConfig(event) {
|
||||||
|
const isActor = this.item instanceof CONFIG.Actor.documentClass;
|
||||||
|
const isItem = this.item instanceof CONFIG.Item.documentClass;
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
event,
|
event,
|
||||||
title: `${this.item instanceof CONFIG.Actor.documentClass ? '' : `${this.item.name}: `}${game.i18n.localize(this.name)}`,
|
title: `${isActor || isItem ? '' : `${this.item.name}: `}${game.i18n.localize(this.name)}`,
|
||||||
source: {
|
source: {
|
||||||
item: this.item._id,
|
item: this.item._id,
|
||||||
originItem: this.originItem,
|
originItem: this.originItem,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue