Datamodel + Appv2 migration, WIP

This commit is contained in:
2026-01-12 23:32:51 +01:00
parent 2abd2c881a
commit ed76a49e7d
27 changed files with 1695 additions and 1494 deletions

View File

@@ -18,6 +18,9 @@ import { BoLHotbar } from "./system/bol-hotbar.js"
import { BoLCommands } from "./system/bol-commands.js"
import { BoLRoll } from "./controllers/bol-rolls.js"
// Import DataModels
import * as models from "./models/_module.mjs"
/* -------------------------------------------- */
Hooks.once('init', async function () {
@@ -28,7 +31,8 @@ Hooks.once('init', async function () {
BoLRoll,
BoLUtility,
macros: Macros,
config: BOL
config: BOL,
models
};
// Game socket
@@ -47,7 +51,19 @@ Hooks.once('init', async function () {
// Define custom Entity classes
CONFIG.Actor.documentClass = BoLActor;
CONFIG.Actor.dataModels = {
character: models.BoLCharacter,
encounter: models.BoLEncounter,
horde: models.BoLHorde,
vehicle: models.BoLVehicle
}
CONFIG.Item.documentClass = BoLItem;
CONFIG.Item.dataModels = {
item: models.BoLItem,
feature: models.BoLFeature
}
CONFIG.Combat.documentClass = BoLCombatManager;
// Register sheet application classes