utilisation de renderTemplate "interne"

Import de foundry.applications.handlebars.renderTemplate
au travers d'une constante pour éliminer les warnings
This commit is contained in:
2025-09-30 02:03:02 +02:00
parent 053bc23d12
commit d0ba1ebf99
43 changed files with 57 additions and 32 deletions

View File

@@ -4,6 +4,7 @@ import { RdDCarac } from "../rdd-carac.js"
import { RdDCombat } from "../rdd-combat.js"
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll-constants.mjs"
import { RdDResolutionTable } from "../rdd-resolution-table.js"
import { RDD_CONFIG, renderTemplate } from "../constants.js"
export default class ChatRollResult {
static init() {
@@ -76,7 +77,7 @@ export default class ChatRollResult {
async buildRollHtml(roll) {
const template = `systems/foundryvtt-reve-de-dragon/templates/roll/result/chat-${roll.type.current}.hbs`
return await foundry.applications.handlebars.renderTemplate(template, roll)
return await renderTemplate(template, roll)
}
async chatListeners(html) {

View File

@@ -39,6 +39,7 @@ import { RollDialogAdapter } from "./roll-dialog-adapter.mjs";
import { ROLLDIALOG_SECTION } from "./roll-part.mjs";
import { ROLL_TYPE_COMP } from "./roll-constants.mjs";
import ChatRollResult from "./chat-roll-result.mjs";
import { renderTemplate } from "../constants.js";
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api
@@ -368,7 +369,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
}
async buildHTMLTable(carac, diff) {
return await foundry.applications.handlebars.renderTemplate('roll-table', { carac, diff })
return await renderTemplate('roll-table', { carac, diff })
}
async _prepareContext() {