Begin working on Aspect items
This commit is contained in:
parent
58facf1490
commit
25e3fa1bb8
14 changed files with 204 additions and 80 deletions
28
module/sheets/AspectSheet.mjs
Normal file
28
module/sheets/AspectSheet.mjs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export class AspectSheet extends ItemSheet {
|
||||
static get defaultOptions() {
|
||||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
{
|
||||
template: `systems/dotdungeon/templates/items/aspect.hbs`,
|
||||
width: 280,
|
||||
height: 340,
|
||||
}
|
||||
);
|
||||
opts.classes.push(`dotdungeon`);
|
||||
return opts;
|
||||
};
|
||||
|
||||
getData() {
|
||||
const ctx = super.getData();
|
||||
const item = this.item.toObject(false);
|
||||
|
||||
ctx.system = item.system;
|
||||
ctx.flags = item.flags;
|
||||
|
||||
console.groupCollapsed(`AspectSheet.getData`);
|
||||
console.log(`ctx`, ctx);
|
||||
console.log(`item`, item);
|
||||
console.groupEnd();
|
||||
return ctx;
|
||||
};
|
||||
};
|
||||
|
|
@ -3,10 +3,10 @@ export class PlayerSheet extends ActorSheet {
|
|||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
{
|
||||
template: "systems/dotdungeon/templates/actors/char-sheet-mvp/sheet.hbs"
|
||||
template: `systems/dotdungeon/templates/actors/char-sheet-mvp/sheet.hbs`
|
||||
}
|
||||
);
|
||||
opts.classes.push("dotdungeon");
|
||||
opts.classes.push(`dotdungeon`);
|
||||
return opts;
|
||||
};
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ export class PlayerSheet extends ActorSheet {
|
|||
ctx.system = actor.system;
|
||||
ctx.flags = actor.flags;
|
||||
|
||||
console.group(`PlayerSheet.getData`);
|
||||
console.groupCollapsed(`PlayerSheet.getData`);
|
||||
console.log(`ctx`, ctx);
|
||||
console.log(`actor`, actor);
|
||||
console.groupEnd();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue