Foundry v13 migration
This commit is contained in:
@@ -4,7 +4,7 @@ import { MournbladeUtility } from "./mournblade-utility.js";
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class MournbladeItemSheet extends ItemSheet {
|
||||
export class MournbladeItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -49,7 +49,7 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
let itemData = objectData
|
||||
let itemData = objectData
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: this.id,
|
||||
@@ -63,14 +63,14 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, {async: true}),
|
||||
config: game.system.mournblade.config,
|
||||
mr: (this.object.type == 'specialisation'),
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
|
||||
if ( objectData.type == "don") {
|
||||
formData.sacrifice = await TextEditor.enrichHTML(this.object.system.sacrifice, {async: true})
|
||||
formData.sacrifice = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.sacrifice, {async: true})
|
||||
}
|
||||
//this.options.editable = !(this.object.origin == "embeddedItem");
|
||||
console.log("ITEM DATA", formData, this);
|
||||
@@ -151,7 +151,7 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
let pred = foundry.utils.duplicate(this.object.system.predilections)
|
||||
pred[index].used = ev.currentTarget.checked
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
})
|
||||
html.find('#add-predilection').click(ev => {
|
||||
let pred = foundry.utils.duplicate(this.object.system.predilections)
|
||||
pred.push( { name: "Nouvelle prédilection", id: randomID(), used: false })
|
||||
|
||||
Reference in New Issue
Block a user