diff --git a/src/module/item/item-sheet.ts b/src/module/item/item-sheet.ts index 04627683..e2cbd334 100644 --- a/src/module/item/item-sheet.ts +++ b/src/module/item/item-sheet.ts @@ -6,13 +6,12 @@ import { DS4 } from "../config"; import notifications from "../ui/notifications"; -import { DS4Item } from "./item"; import { isDS4ItemDataTypePhysical } from "./item-data-source"; /** * The Sheet class for DS4 Items */ -export class DS4ItemSheet extends ItemSheet { +export class DS4ItemSheet extends ItemSheet { /** @override */ static get defaultOptions(): ItemSheet.Options { // TODO: Improve @@ -32,17 +31,18 @@ export class DS4ItemSheet extends ItemSheet { const basePath = "systems/ds4/templates/sheets/item"; return `${basePath}/${this.item.data.type}-sheet.hbs`; } - // /** @override */ - // async getData(): Promise> { - // const data = { - // ...(await super.getData()), - // config: DS4, - // isOwned: this.item.isOwned, - // actor: this.item.actor, - // isPhysical: isDS4ItemDataTypePhysical(this.item.data.data), - // }; - // return data; - // } + + /** @override */ + async getData(): Promise { + return { + ...(await super.getData()), + config: DS4, + isOwned: this.item.isOwned, + actor: this.item.actor, + isPhysical: isDS4ItemDataTypePhysical(this.item.data.data), + }; + } + /** @override */ setPosition(options: Partial = {}): (Application.Position & { height: number }) | undefined { const position = super.setPosition(options); @@ -109,3 +109,10 @@ export class DS4ItemSheet extends ItemSheet { return ActiveEffect.create(createData, { parent: this.item }); } } + +interface DS4ItemSheetData extends ItemSheet.Data { + config: typeof DS4; + isOwned: boolean; + actor: DS4ItemSheet["item"]["actor"]; + isPhysical: boolean; +}