Compat FVTT v13 - adding namespaces

This commit is contained in:
Vlyan
2025-05-01 14:41:43 +02:00
parent 95fa36d7a8
commit 897ccefd71
19 changed files with 87 additions and 71 deletions

View File

@@ -193,7 +193,7 @@ export class RollnKeepDialog extends FormApplication {
*/
_createDragDropHandlers() {
return [
new DragDrop({
new foundry.applications.ux.DragDrop.implementation({
dragSelector: ".dice.draggable",
dropSelector: ".dropbox",
permissions: { dragstart: this.isEditable, drop: this.isEditable },
@@ -259,13 +259,13 @@ export class RollnKeepDialog extends FormApplication {
// GM Only, need to be before the editable check
if (game.user.isGM && this.object.currentStep > 0) {
// Add Context menu to rollback choices
new ContextMenu(html, ".l5r5e.profil", [
new foundry.applications.ux.ContextMenu.implementation(html[0], ".l5r5e.profil", [
{
name: game.i18n.localize("l5r5e.dice.roll_n_keep.undo"),
icon: '<i class="fas fa-undo"></i>',
callback: () => this._undoLastStepChoices(),
},
]);
], { jQuery: false });
}
// *** Everything below here is only needed if the sheet is editable ***

View File

@@ -257,7 +257,7 @@ export class RollL5r5e extends Roll {
displaySummary: contexte?.from !== "render",
};
return renderTemplate(CONFIG.l5r5e.paths.templates + this.constructor.TOOLTIP_TEMPLATE, { chatData });
return foundry.applications.handlebars.renderTemplate(CONFIG.l5r5e.paths.templates + this.constructor.TOOLTIP_TEMPLATE, { chatData });
}
/**
@@ -319,7 +319,7 @@ export class RollL5r5e extends Roll {
};
// Render the roll display template
return renderTemplate(chatOptions.template, chatData);
return foundry.applications.handlebars.renderTemplate(chatOptions.template, chatData);
}
/**