Move context preparation common to all items into the GenericItemSheet
This commit is contained in:
parent
acd4d35da0
commit
23dd021df6
4 changed files with 4 additions and 15 deletions
|
|
@ -23,13 +23,6 @@ export class AspectSheet extends GenericItemSheet {
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
const ctx = {};
|
const ctx = {};
|
||||||
const item = this.item;
|
|
||||||
|
|
||||||
ctx.item = item;
|
|
||||||
ctx.system = item.system;
|
|
||||||
ctx.flags = item.flags;
|
|
||||||
|
|
||||||
console.log(item.uuid, `context:`, ctx);
|
|
||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -33,6 +33,10 @@ export class GenericItemSheet extends ItemSheet {
|
||||||
idp: this.item.uuid,
|
idp: this.item.uuid,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ctx.item = this.item;
|
||||||
|
ctx.system = this.item.system;
|
||||||
|
ctx.flags = this.item.flags;
|
||||||
|
|
||||||
ctx.config = DOTDUNGEON;
|
ctx.config = DOTDUNGEON;
|
||||||
ctx.icons = CONFIG.CACHE.icons;
|
ctx.icons = CONFIG.CACHE.icons;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,6 @@ export class PetSheet extends GenericItemSheet {
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
const ctx = await super.getData();
|
const ctx = await super.getData();
|
||||||
|
|
||||||
ctx.item = this.item;
|
|
||||||
ctx.system = this.item.system;
|
|
||||||
ctx.flags = this.item.flags;
|
|
||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,6 @@ export class SpellSheet extends GenericItemSheet {
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
const ctx = await super.getData();
|
const ctx = await super.getData();
|
||||||
|
|
||||||
ctx.item = this.item;
|
|
||||||
ctx.system = this.item.system;
|
|
||||||
ctx.flags = this.item.flags;
|
|
||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue