diff --git a/kidsonbrooms.mjs b/kidsonbrooms.mjs index e49f9c1..18f680f 100644 --- a/kidsonbrooms.mjs +++ b/kidsonbrooms.mjs @@ -1,5 +1,5 @@ import * as models from "./modules/dataModel/_system.mjs"; - +import * as sheets from "./modules/sheets/_system.mjs"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ @@ -16,10 +16,8 @@ Hooks.once("init", async function() { game.system.CONST = SYSTEM; Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet(SYSTEM.id, "core", {types: ["PlayerCharacter"], makeDefault: true}); + Actors.registerSheet(SYSTEM.id, "{{sheets.BaseActorSheet}}", {types: ["PlayerCharacter"], makeDefault: true}); - CONFIG.Actor.dataModels = { - playercharacter: models.playerCharacterModel - }; + CONFIG.Actor.dataModels = models.playerCharacterModel; }) \ No newline at end of file diff --git a/modules/dataModel/playerCharacterModel.mjs b/modules/dataModel/playerCharacterModel.mjs index 3917513..966a2a6 100644 --- a/modules/dataModel/playerCharacterModel.mjs +++ b/modules/dataModel/playerCharacterModel.mjs @@ -22,6 +22,7 @@ export default class PlayerCharacter extends ActorGeneral } static LOCALISATION_PREFIXES = ["PlayerCharacter"]; + prepareBaseData() { super.prepareBaseData(); let effectsToApply = this.gatherEffects(); diff --git a/modules/sheets/_system.mjs b/modules/sheets/_system.mjs index e69de29..01270aa 100644 --- a/modules/sheets/_system.mjs +++ b/modules/sheets/_system.mjs @@ -0,0 +1 @@ +export * from "./actor-sheet.mjs" \ No newline at end of file diff --git a/modules/sheets/actor-sheet.mjs b/modules/sheets/actor-sheet.mjs index 4901691..3195a3c 100644 --- a/modules/sheets/actor-sheet.mjs +++ b/modules/sheets/actor-sheet.mjs @@ -1,4 +1,4 @@ -const {api, sheet} = foundry.applications; +const {api, sheets} = foundry.applications; export default class BaseActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorSheetV2) { @@ -21,4 +21,11 @@ export default class BaseActorSheet extends api.HandlebarsApplicationMixin(sheet return `systems/kidsonbrooms/templates/actor/actor-sheet-{$this.actor.type}.html`; } + async getData() + { + const context = super.getData(); + + console.log(context); + return context; + } } \ No newline at end of file diff --git a/templates/actor/actor-sheet-PlayerCharacter.html b/templates/actor/actor-sheet-PlayerCharacter.html new file mode 100644 index 0000000..a3e3bce --- /dev/null +++ b/templates/actor/actor-sheet-PlayerCharacter.html @@ -0,0 +1,5 @@ +
+
+ +
+
\ No newline at end of file diff --git a/templates/actor/actor-sheet-pc.html b/templates/actor/actor-sheet-pc.html deleted file mode 100644 index b671758..0000000 --- a/templates/actor/actor-sheet-pc.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
- - - \ No newline at end of file