Work on creating more of the necessary data models
This commit is contained in:
parent
ef9a3f2542
commit
eb8d4f7c11
8 changed files with 56 additions and 15 deletions
|
|
@ -1,13 +1,11 @@
|
|||
import AspectItem from "./Aspect.mjs";
|
||||
import SpellItem from "./Spell.mjs";
|
||||
|
||||
/**
|
||||
* @extends {Item}
|
||||
*/
|
||||
/** @extends {Item} */
|
||||
export class ItemHandler extends Item {
|
||||
/** @override */
|
||||
|
||||
proxyTargets = {
|
||||
aspect: AspectItem,
|
||||
spell: SpellItem
|
||||
};
|
||||
|
||||
constructor(data, ctx) {
|
||||
|
|
@ -19,6 +17,11 @@ export class ItemHandler extends Item {
|
|||
return this.proxyTargets[this.type];
|
||||
};
|
||||
|
||||
async migrateSystemData() {
|
||||
if (!this.fn?.migrateSystemData) return;
|
||||
this.fn?.migrateSystemData.bind(this)();
|
||||
};
|
||||
|
||||
async proxyFunction(funcName, ...args) {
|
||||
if (!this.fn?.[funcName]) return;
|
||||
return await this.fn?.[funcName].bind(this)(...args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue