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
|
|
@ -70,13 +70,16 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
|||
const cls = getDocumentClass('ChatMessage');
|
||||
const msg = new cls({
|
||||
user: game.user.id,
|
||||
content: await renderTemplate('systems/daggerheart/templates/chat/downtime.hbs', {
|
||||
player: this.actor.name,
|
||||
title: game.i18n.localize(this.selectedActivity.name),
|
||||
img: this.selectedActivity.img,
|
||||
description: game.i18n.localize(this.selectedActivity.description),
|
||||
refreshedFeatures: refreshedFeatures
|
||||
})
|
||||
content: await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/chat/downtime.hbs',
|
||||
{
|
||||
player: this.actor.name,
|
||||
title: game.i18n.localize(this.selectedActivity.name),
|
||||
img: this.selectedActivity.img,
|
||||
description: game.i18n.localize(this.selectedActivity.description),
|
||||
refreshedFeatures: refreshedFeatures
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
cls.create(msg.toObject());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue