Foundry v13 migraton, WIP

This commit is contained in:
2025-05-14 22:09:35 +02:00
parent cc4cbbc771
commit 6b053b189b
33 changed files with 151 additions and 96 deletions

View File

@ -22,7 +22,7 @@ export class RdDRoll extends Dialog {
RdDRoll._ensureCorrectAction(action);
RdDRoll._setDefaultOptions(actor, rollData);
const html = await renderTemplate(dialogConfig.html, rollData);
const html = await foundry.applications.handlebars.renderTemplate(dialogConfig.html, rollData);
let options = { classes: ["rdd-roll-dialog"], width: 650, height: 'fit-content', 'z-index': 99999, close: html => { } };
if (dialogConfig.close) {
@ -145,7 +145,7 @@ export class RdDRoll extends Dialog {
}
if (this.rollData.selectedSort) {
this.setSelectedSort(this.rollData.selectedSort);
this.html.find(".draconic").val(this.rollData.selectedSort.system.listIndex); // Uniquement a la selection du sort, pour permettre de changer
this.html.find(".draconic").val(this.rollData.selectedSort.system.listIndex); // Uniquement a la selection du sort, pour permettre de changer
}
RdDItemSort.setCoutReveReel(this.rollData.selectedSort);
this.html.find("[name='diffLibre']").val(Misc.toInt(this.rollData.diffLibre));
@ -344,7 +344,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */
async buildAjustements(rollData) {
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
return await foundry.applications.handlebars.renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
}
/* -------------------------------------------- */