Cleanup et preparation Foundry v12

This commit is contained in:
2024-05-01 09:33:34 +02:00
parent 8f0bf91464
commit 85e0249822
173 changed files with 659 additions and 341 deletions

View File

@@ -11,7 +11,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["yggdrasill", "sheet", "actor"],
template: "systems/fvtt-yggdrasill/templates/figurant-sheet.html",
width: 640,
@@ -24,7 +24,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
/* -------------------------------------------- */
async getData() {
const objectData = duplicate(this.object)
const objectData = foundry.utils.duplicate(this.object)
let formData = {
title: this.title,
@@ -40,14 +40,15 @@ export class YggdrasillFigurantSheet extends ActorSheet {
effetsmagiques: this.actor.getEffetsMagiques(),
encTotal: this.actor.getEncTotal(),
monnaies: this.actor.getMonnaies(),
optionsAttr: new Array(41).fill('option'),
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}),
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
isGM: game.user.isGM
isGM: game.user.isGM,
config: game.system.config
}
console.log("FIGURANT : ", formData);