Fouindry v13 support

This commit is contained in:
2025-04-30 23:51:45 +02:00
parent fdf28c4978
commit 627ccc707b
141 changed files with 475 additions and 357 deletions

View File

@@ -4,7 +4,7 @@ import { WastelandUtility } from "./wasteland-utility.js";
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class WastelandItemSheet extends ItemSheet {
export class WastelandItemSheet extends foundry.appv1.sheets.ItemSheet {
/** @override */
static get defaultOptions() {
@@ -49,7 +49,7 @@ export class WastelandItemSheet 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,
@@ -147,10 +147,10 @@ export class WastelandItemSheet extends ItemSheet {
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred[index].used = ev.currentTarget.checked
this.object.update( { 'data.predilections': pred })
})
})
html.find('#add-predilection').click(ev => {
let pred = foundry.utils.duplicate(this.object.system.predilections)
pred.push( { name: "Nouvelle prédilection", used: false })
pred.push( { name: "Nouvelle prédilection", used: false })
this.object.update( { 'data.predilections': pred })
})
// Update Inventory Item