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

@@ -8,8 +8,7 @@ import { RdDCarac } from "./rdd-carac.js";
import { RdDResolutionTable } from "./rdd-resolution-table.js";
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
import { Grammar } from "./grammar.js";
import { ACTOR_TYPES } from "./constants.js";
import { RdDUtility } from "./rdd-utility.js";
import { ACTOR_TYPES, renderTemplate } from "./constants.js";
/**
* Extend the base Dialog entity to select roll parameters
@@ -23,7 +22,7 @@ export class RdDRoll extends Dialog {
RdDRoll._ensureCorrectAction(action);
RdDRoll._setDefaultOptions(actor, rollData);
const html = await foundry.applications.handlebars.renderTemplate(dialogConfig.html, rollData);
const html = await renderTemplate(dialogConfig.html, rollData);
let options = { classes: ["rdd-roll-dialog"], width: 650, height: 'fit-content', 'z-index': 99999, close: html => { } };
if (dialogConfig.close) {
@@ -345,7 +344,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */
async buildAjustements(rollData) {
return await foundry.applications.handlebars.renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
}
/* -------------------------------------------- */