fix chatmessage to render the template in constructor. Update namespaces.

This commit is contained in:
IrkTheImp 2025-05-29 20:42:25 -05:00
parent 4de3e94fd7
commit cc6c9a11bc
10 changed files with 117 additions and 76 deletions

View file

@ -47,12 +47,15 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application
const cls = getDocumentClass('ChatMessage');
const msg = new cls({
user: game.user.id,
content: await renderTemplate('systems/daggerheart/templates/chat/deathMove.hbs', {
player: this.actor.name,
title: game.i18n.localize(this.selectedMove.name),
img: this.selectedMove.img,
description: game.i18n.localize(this.selectedMove.description)
})
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/chat/deathMove.hbs',
{
player: this.actor.name,
title: game.i18n.localize(this.selectedMove.name),
img: this.selectedMove.img,
description: game.i18n.localize(this.selectedMove.description)
}
)
});
cls.create(msg.toObject());