Add an ItemHandler class and prevent players from having more than 1 aspect.
This commit is contained in:
parent
82108bfe5f
commit
38fcb1193a
7 changed files with 49 additions and 6 deletions
|
|
@ -1,4 +1,6 @@
|
|||
export class AspectSheet extends ItemSheet {
|
||||
import { GenericItemSheet } from "./GenericItemSheet.mjs";
|
||||
|
||||
export class AspectSheet extends GenericItemSheet {
|
||||
static get defaultOptions() {
|
||||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
|
|
@ -21,13 +23,13 @@ export class AspectSheet extends ItemSheet {
|
|||
|
||||
async getData() {
|
||||
const ctx = {};
|
||||
const item = this.item.toObject(false);
|
||||
const item = this.item;
|
||||
|
||||
ctx.name = super.name;
|
||||
ctx.item = item;
|
||||
ctx.system = item.system;
|
||||
ctx.flags = item.flags;
|
||||
|
||||
console.log(item.uuid, `context:`, ctx);
|
||||
return ctx;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue