Pets and misc changes
This commit is contained in:
parent
4a3523d6cf
commit
b30aa18a27
15 changed files with 244 additions and 32 deletions
32
module/sheets/PetSheet.mjs
Normal file
32
module/sheets/PetSheet.mjs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { GenericItemSheet } from "./GenericItemSheet.mjs";
|
||||
|
||||
export class PetSheet extends GenericItemSheet {
|
||||
static get defaultOptions() {
|
||||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
{
|
||||
template: `systems/dotdungeon/templates/items/pet.hbs`,
|
||||
width: 280,
|
||||
height: 340,
|
||||
}
|
||||
);
|
||||
opts.classes.push(`dotdungeon`);
|
||||
return opts;
|
||||
};
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
if (!this.isEditable) return;
|
||||
console.debug(`.dungeon | Adding event listeners for Pet Item: ${this.id}`);
|
||||
};
|
||||
|
||||
async getData() {
|
||||
const ctx = await super.getData();
|
||||
|
||||
ctx.item = this.item;
|
||||
ctx.system = this.item.system;
|
||||
ctx.flags = this.item.flags;
|
||||
return ctx;
|
||||
};
|
||||
};
|
||||
|
|
@ -27,7 +27,6 @@ export class SpellSheet extends GenericItemSheet {
|
|||
ctx.item = this.item;
|
||||
ctx.system = this.item.system;
|
||||
ctx.flags = this.item.flags;
|
||||
console.log(ctx)
|
||||
return ctx;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue