Big WIP...
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user