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,8 +22,8 @@ export class TMRRencontres {
/* -------------------------------------------- */
/**
* Retourne une recontre en fonction de la case et du tirage
* @param {*} terrain
* @param {*} forcedRoll
* @param {*} terrain
* @param {*} forcedRoll
*/
async rollRencontre(terrain, forcedRoll) {
const tmrType = TMRUtility.findTMRLike(terrain, { inclusMauvaise: true })?.type
@@ -102,7 +102,7 @@ export class TMRRencontres {
/* -------------------------------------------- */
async $chatRolledRencontre(row, rencontre, tmr) {
const flavorContent = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-compendium-table-roll-rencontre.hbs',
const flavorContent = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-compendium-table-roll-rencontre.hbs',
{
roll: row.roll,
rencontre,
@@ -113,7 +113,7 @@ export class TMRRencontres {
});
const messageData = {
user: game.user.id,
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
type: CONST.CHAT_MESSAGE_STYLES.ROLL,
roll: row.roll,
sound: CONFIG.sounds.dice,
content: flavorContent