v10 migration
This commit is contained in:
@@ -48,19 +48,19 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = CrucibleUtility.data(this.object);
|
||||
if ( objectData.type == "skill") {
|
||||
console.log(objectData)
|
||||
CrucibleUtility.updateSkill(objectData)
|
||||
|
||||
if ( this.object.type == "skill") {
|
||||
CrucibleUtility.updateSkill(this.object)
|
||||
}
|
||||
let objectData = duplicate(this.object.system)
|
||||
|
||||
let itemData = foundry.utils.deepClone(CrucibleUtility.templateData(this.object))
|
||||
let itemData = objectData
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: this.id,
|
||||
type: objectData.type,
|
||||
img: objectData.img,
|
||||
name: objectData.name,
|
||||
type: this.object.type,
|
||||
img: this.object.img,
|
||||
name: this.object.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
weaponSkills: CrucibleUtility.getWeaponSkills(),
|
||||
@@ -72,7 +72,7 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
|
||||
this.options.editable = !(this.object.data.origin == "embeddedItem");
|
||||
this.options.editable = !(this.object.origin == "embeddedItem");
|
||||
console.log("ITEM DATA", formData, this);
|
||||
return formData;
|
||||
}
|
||||
@@ -136,13 +136,6 @@ export class CrucibleItemSheet extends ItemSheet {
|
||||
this.deleteSubitem(ev);
|
||||
});
|
||||
|
||||
html.find('.stat-choice-flag').click(ev => {
|
||||
let idx = $(ev.currentTarget).data("stat-idx");
|
||||
let array = duplicate(this.object.data.data.statincreasechoice);
|
||||
array[Number(idx)].flag = !array[Number(idx)].flag;
|
||||
this.object.update({ "data.statincreasechoice": array });
|
||||
});
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
|
Reference in New Issue
Block a user