Start 0.8 support
This commit is contained in:
@@ -43,15 +43,30 @@ export class SoSItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
let data = super.getData();
|
||||
data.isGM = game.user.isGM;
|
||||
if ( data.item.type == 'skillexperience') {
|
||||
data.skillList = await SoSUtility.loadCompendiumNames("foundryvtt-shadows-over-sol.skills");
|
||||
const objectData = SoSUtility.data(this.object);
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
type: objectData.type,
|
||||
img: objectData.img,
|
||||
name: objectData.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
data: foundry.utils.deepClone(this.object.data),
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner
|
||||
};
|
||||
|
||||
formData.isGM = game.user.isGM;
|
||||
if ( objectData.type == 'skillexperience') {
|
||||
formData.skillList = await SoSUtility.loadCompendiumNames("foundryvtt-shadows-over-sol.skills");
|
||||
}
|
||||
if ( data.item.type == 'skill' && this.object.options?.actor) {
|
||||
data.skillExperienceList = this.object.options.actor.getSkillExperience( data.item.name );
|
||||
if ( objectData.type == 'skill' && this.object.options?.actor) {
|
||||
formData.skillExperienceList = this.object.options.actor.getSkillExperience( data.item.name );
|
||||
}
|
||||
return data;
|
||||
return formData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user