mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
style remaing chat messages
This commit is contained in:
parent
e4820dd6bd
commit
76cfcb29ea
9 changed files with 103 additions and 59 deletions
|
|
@ -54,6 +54,8 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application
|
|||
{
|
||||
player: this.actor.name,
|
||||
actor: { name: this.actor.name, img: this.actor.img },
|
||||
author: this.author,
|
||||
speaker: cls.getSpeaker(),
|
||||
title: game.i18n.localize(this.selectedMove.name),
|
||||
img: this.selectedMove.img,
|
||||
description: game.i18n.localize(this.selectedMove.description)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
});
|
||||
|
||||
const actor = game.actors.get(this.speaker.actor);
|
||||
const actorData = actor ?? { img: 'icons/svg/mystery-man.svg', name: '' };
|
||||
const actorData = actor ?? {
|
||||
img: this.author.avatar ? this.author.avatar : 'icons/svg/mystery-man.svg',
|
||||
name: ''
|
||||
};
|
||||
/* We can change to fully implementing the renderHTML function if needed, instead of augmenting it. */
|
||||
const html = await super.renderHTML({ actor: actorData });
|
||||
const html = await super.renderHTML({ actor: actorData, author: this.author });
|
||||
console.log(this.author);
|
||||
this.applyPermission(html);
|
||||
|
||||
if (this.type === 'dualityRoll') {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,11 @@ export default class DHItem extends foundry.documents.Item {
|
|||
const msg = new cls({
|
||||
type: 'abilityUse',
|
||||
user: game.user.id,
|
||||
actor: this.actor,
|
||||
author: this.author,
|
||||
speaker: cls.getSpeaker(),
|
||||
system: systemData,
|
||||
title: game.i18n.localize('DAGGERHEART.ACTIONS.Config.displayInChat'),
|
||||
content: await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/ui/chat/ability-use.hbs',
|
||||
systemData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue