Made the action config title not get changed in d20rolldialog if it's not a trait roll

This commit is contained in:
WBHarry 2026-02-02 01:10:46 +01:00
parent 357b94c128
commit 90a98a3248
2 changed files with 8 additions and 4 deletions

View file

@ -240,9 +240,12 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
* @returns {object}
*/
prepareBaseConfig(event) {
const isActor = this.item instanceof CONFIG.Actor.documentClass;
const isItem = this.item instanceof CONFIG.Item.documentClass;
const config = {
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: {
item: this.item._id,
originItem: this.originItem,