Fixed so Adversary features can be sent to chat. Fixed so ability-card.hbs works again (#525)

This commit is contained in:
WBHarry 2025-08-02 22:33:21 +02:00 committed by GitHub
parent 1df0852df3
commit af40f9d712
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 26 deletions

View file

@ -132,6 +132,8 @@ export default class DHItem extends foundry.documents.Item {
async toChat(origin) {
const cls = getDocumentClass('ChatMessage');
const item = await foundry.utils.fromUuid(origin);
const systemData = {
title:
this.type === 'ancestry'
@ -148,13 +150,14 @@ export default class DHItem extends foundry.documents.Item {
img: this.img,
tags: this._getTags()
},
description: this.system.description,
actions: this.system.actions
actions: item.system.actions,
description: this.system.description
};
const msg = {
type: 'abilityUse',
user: game.user.id,
actor: game.actors.get(cls.getSpeaker().actor),
actor: item.parent,
author: this.author,
speaker: cls.getSpeaker(),
system: systemData,