Big WIP...

This commit is contained in:
2022-06-12 08:17:59 +02:00
parent a3fb328b7d
commit 451ee677d2
56 changed files with 990 additions and 921 deletions

View File

@ -22,33 +22,26 @@ export class RdDActorEntiteSheet extends ActorSheet {
});
}
/* -------------------------------------------- */
_checkNull(items) {
if (items && items.length) {
return items;
}
return [];
}
/* -------------------------------------------- */
async getData() {
const objectData = Misc.data(this.object);
let formData = {
title: this.title,
id: this.object.id,
type: this.object.type,
img: this.object.img,
name: this.object.name,
id: objectData.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
// actor: this.object,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(Misc.templateData(this.object)),
data: foundry.utils.deepClone(this.actor.system),
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
// items: items,
limited: this.object.limited,
options: this.options,
owner: this.document.isOwner,
itemsByType: Misc.classify(this.object.items.map(i => foundry.utils.deepClone(i))),
itemsByType: Misc.classify(this.object.items.map(i => foundry.utils.deepClone(i.system))),
};
formData.options.isGM = game.user.isGM;