Files
foundryvtt-reve-de-dragon/module/rdd-roll-result.js
Vincent Vandemeulebrouck d0ba1ebf99 utilisation de renderTemplate "interne"
Import de foundry.applications.handlebars.renderTemplate
au travers d'une constante pour éliminer les warnings
2025-09-30 02:04:53 +02:00

20 lines
694 B
JavaScript

import { ChatUtility } from "./chat-utility.js";
import { renderTemplate } from "./constants.js";
export class RdDRollResult {
static async displayRollData(rollData, actor = undefined, template = 'chat-resultat-general.hbs') {
const chatMessage = await ChatUtility.createChatWithRollMode(
{ content: await RdDRollResult.buildRollDataHtml(rollData, template) },
actor,
rollData.current?.rollmode?.key
)
return chatMessage
}
static async buildRollDataHtml(rollData, template = 'chat-resultat-general.hbs') {
rollData.show = rollData.show || {};
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
}
}