Fix item sheets

This commit is contained in:
Johannes Loher 2021-06-30 14:24:23 +02:00
parent 8a939e84a1
commit 91e5007391
12 changed files with 108 additions and 100 deletions

View file

@ -55,10 +55,10 @@ async function init() {
registerSystemSettings();
Actors.unregisterSheet("core", ActorSheet);
// Actors.registerSheet("ds4", DS4CharacterActorSheet, { types: ["character"], makeDefault: true });
// Actors.registerSheet("ds4", DS4CreatureActorSheet, { types: ["creature"], makeDefault: true });
Actors.registerSheet("ds4", DS4CharacterActorSheet, { types: ["character"], makeDefault: true });
Actors.registerSheet("ds4", DS4CreatureActorSheet, { types: ["creature"], makeDefault: true });
Items.unregisterSheet("core", ItemSheet);
// Items.registerSheet("ds4", DS4ItemSheet, { makeDefault: true });
Items.registerSheet("ds4", DS4ItemSheet, { makeDefault: true });
await registerHandlebarsPartials();
registerHandlebarsHelpers();

View file

@ -34,13 +34,14 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Options, DS4ItemSheetData>
/** @override */
async getData(): Promise<DS4ItemSheetData> {
return {
const data = {
...(await super.getData()),
config: DS4,
isOwned: this.item.isOwned,
actor: this.item.actor,
isPhysical: isDS4ItemDataTypePhysical(this.item.data.data),
};
return data;
}
/** @override */