From 2ba580da58b700bf3fbcce6e4c5cb264a1d31283 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 9 Jun 2025 15:01:37 +0200 Subject: [PATCH] Gathered exports --- daggerheart.mjs | 7 ++----- module/data/_module.mjs | 4 +--- module/data/actor/_module.mjs | 11 +++++++++++ module/data/actor/environment.mjs | 4 ++-- 4 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 module/data/actor/_module.mjs diff --git a/daggerheart.mjs b/daggerheart.mjs index e223865d..17707d68 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -54,11 +54,8 @@ Hooks.once('init', () => { Items.registerSheet(SYSTEM.id, applications.DhpArmor, { types: ['armor'], makeDefault: true }); CONFIG.Actor.documentClass = documents.DhpActor; - CONFIG.Actor.dataModels = { - character: models.DhCharacter, - adversary: models.DhpAdversary, - environment: models.DhpEnvironment - }; + CONFIG.Actor.dataModels = models.actors.config; + Actors.unregisterSheet('core', foundry.applications.sheets.ActorSheetV2); Actors.registerSheet(SYSTEM.id, applications.DhCharacterSheet, { types: ['character'], makeDefault: true }); Actors.registerSheet(SYSTEM.id, applications.DhpAdversarySheet, { types: ['adversary'], makeDefault: true }); diff --git a/module/data/_module.mjs b/module/data/_module.mjs index 44ff4006..e7712547 100644 --- a/module/data/_module.mjs +++ b/module/data/_module.mjs @@ -1,10 +1,8 @@ -export { default as DhCharacter } from './actor/character.mjs'; export { default as DhClass } from './item/class.mjs'; export { default as DhSubclass } from './item/subclass.mjs'; export { default as DhCombat } from './combat.mjs'; export { default as DhCombatant } from './combatant.mjs'; -export { default as DhpAdversary } from './actor/adversary.mjs'; -export { default as DhpEnvironment } from './environment.mjs'; +export * as actors from './actor/_module.mjs'; export * as items from './item/_module.mjs'; export * as messages from './chat-message/_modules.mjs'; diff --git a/module/data/actor/_module.mjs b/module/data/actor/_module.mjs new file mode 100644 index 00000000..cdbf7178 --- /dev/null +++ b/module/data/actor/_module.mjs @@ -0,0 +1,11 @@ +import DhCharacter from './character.mjs'; +import DhAdversary from './adversary.mjs'; +import DhEnvironment from './environment.mjs'; + +export { DhCharacter, DhAdversary, DhEnvironment }; + +export const config = { + character: DhCharacter, + adversary: DhAdversary, + environment: DhEnvironment +}; diff --git a/module/data/actor/environment.mjs b/module/data/actor/environment.mjs index 5a58204c..3209dfdc 100644 --- a/module/data/actor/environment.mjs +++ b/module/data/actor/environment.mjs @@ -1,6 +1,6 @@ -import { environmentTypes } from '../config/actorConfig.mjs'; +import { environmentTypes } from '../../config/actorConfig.mjs'; import BaseDataActor from './base.mjs'; -import ForeignDocumentUUIDField from './fields/foreignDocumentUUIDField.mjs'; +import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs'; export default class DhEnvironment extends BaseDataActor { static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Environment'];