Initialize the data model and register it

This commit is contained in:
Oliver-Akins 2024-12-10 01:19:11 -07:00
parent b33258ec54
commit 5933473e4a
3 changed files with 21 additions and 1 deletions

View file

@ -1 +1,7 @@
{} {
"TYPES": {
"Actor": {
"hero": "Hero"
}
}
}

View file

@ -0,0 +1,10 @@
export class HeroData extends foundry.abstract.TypeDataModel {
static defineSchema() {
const schema = {};
return schema;
};
prepareBaseData() {};
prepareDerivedData() {};
};

View file

@ -1,5 +1,9 @@
import { HeroData } from "../data/Actor/Hero.mjs";
import { Logger } from "../utils/Logger.mjs"; import { Logger } from "../utils/Logger.mjs";
Hooks.once(`init`, () => { Hooks.once(`init`, () => {
Logger.log(`Initializing`); Logger.log(`Initializing`);
// Datamodel registrations
CONFIG.Actor.dataModels.hero = HeroData;
}); });