Add an ItemHandler class and prevent players from having more than 1 aspect.

This commit is contained in:
Oliver-Akins 2024-01-13 15:03:00 -07:00
parent 82108bfe5f
commit 38fcb1193a
7 changed files with 49 additions and 6 deletions

View file

@ -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;
};
};