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

@@ -45,7 +45,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
const sheetData = await super.getData(options);
// Editors enrichment
sheetData.data.enrichedHtml.abilities = await TextEditor.enrichHTML(sheetData.data.system.abilities, {
sheetData.data.enrichedHtml.abilities = await foundry.applications.ux.TextEditor.implementation.enrichHTML(sheetData.data.system.abilities, {
async: true,
});

View File

@@ -2,7 +2,7 @@
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class BaseItemSheetL5r5e extends ItemSheet {
export class BaseItemSheetL5r5e extends foundry.appv1.sheets.ItemSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {

View File

@@ -26,7 +26,7 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
// Editors enrichment
sheetData.data.enrichedHtml = {
description: await TextEditor.enrichHTML(sheetData.data.system.description, { async: true }),
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(sheetData.data.system.description, { async: true }),
};
return sheetData;
@@ -87,7 +87,7 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
// "this.isEditable" fail for tooltips (undefined "this.document")
const isEditable = this.options.editable;
return [
new DragDrop({
new foundry.applications.ux.DragDrop.implementation({
dragSelector: ".property",
dropSelector: null,
permissions: { dragstart: isEditable, drop: isEditable },