Fixed so the different chat themes work again

This commit is contained in:
WBHarry 2025-06-13 00:28:21 +02:00
parent 0f3da99f9d
commit 75ee44af52
6 changed files with 83 additions and 68 deletions

View file

@ -3,6 +3,15 @@ import DHDualityRoll from '../data/chat-message/dualityRoll.mjs';
export default class DhpChatMessage extends foundry.documents.ChatMessage {
async renderHTML() {
if (
this.type === 'dualityRoll' ||
this.type === 'adversaryRoll' ||
this.type === 'damageRoll' ||
this.type === 'abilityUse'
) {
this.content = await foundry.applications.handlebars.renderTemplate(this.content, this.system);
}
/* We can change to fully implementing the renderHTML function if needed, instead of augmenting it. */
const html = await super.renderHTML();