Foundry v13 migration
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { YggdrasillUtility } from "./yggdrasill-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class YggdrasillFigurantSheet extends ActorSheet {
|
||||
export class YggdrasillFigurantSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -25,7 +25,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
@@ -41,9 +41,9 @@ export class YggdrasillFigurantSheet extends ActorSheet {
|
||||
encTotal: this.actor.getEncTotal(),
|
||||
monnaies: this.actor.getMonnaies(),
|
||||
optionsAttr: Array.fromRange(41, 1),
|
||||
optionsBase: YggdrasillUtility.createDirectOptionList(0, 20),
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
|
||||
optionsBase: YggdrasillUtility.createDirectOptionList(0, 20),
|
||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, {async: true}),
|
||||
notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.notes, {async: true}),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
@@ -74,7 +74,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
YggdrasillUtility.confirmDelete(this, li);
|
||||
});
|
||||
|
||||
|
||||
html.find('.equipement-moins').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.decrementeQuantite( li.data("item-id") );
|
||||
@@ -89,16 +89,16 @@ export class YggdrasillFigurantSheet extends ActorSheet {
|
||||
let attrKey = li.data("attr-key");
|
||||
let attrSubKey = $(event.currentTarget).data("attr-sub-key");
|
||||
this.actor.rollAttribute(attrKey, attrSubKey);
|
||||
});
|
||||
});
|
||||
html.find('.lock-unlock-sheet').click((event) => {
|
||||
this.options.editScore = !this.options.editScore;
|
||||
this.render(true);
|
||||
});
|
||||
});
|
||||
html.find('.item-link a').click((event) => {
|
||||
const itemId = $(event.currentTarget).data("item-id");
|
||||
const item = this.actor.items.get(itemId);
|
||||
item.sheet.render(true);
|
||||
});
|
||||
});
|
||||
html.find('.item-equip').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.equiperObject( li.data("item-id") );
|
||||
|
||||
Reference in New Issue
Block a user