mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Issue 80 Chatmessage fix (#81)
* fix chatmessage to render the template in constructor. Update namespaces. * update all chat messages to render templates
This commit is contained in:
parent
c94051744a
commit
7c792f409f
14 changed files with 230 additions and 171 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue