This commit is contained in:
Joscha Maier 2024-11-04 00:47:13 +01:00
parent bc71b3d2cc
commit dd42e5487c
No known key found for this signature in database
GPG Key ID: 8C4D045D84A30ABA
6 changed files with 18 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import * as models from "./modules/dataModel/_system.mjs"; import * as models from "./modules/dataModel/_system.mjs";
import * as sheets from "./modules/sheets/_system.mjs";
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -16,10 +16,8 @@ Hooks.once("init", async function() {
game.system.CONST = SYSTEM; game.system.CONST = SYSTEM;
Actors.unregisterSheet("core", ActorSheet); 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 = { CONFIG.Actor.dataModels = models.playerCharacterModel;
playercharacter: models.playerCharacterModel
};
}) })

View File

@ -22,6 +22,7 @@ export default class PlayerCharacter extends ActorGeneral
} }
static LOCALISATION_PREFIXES = ["PlayerCharacter"]; static LOCALISATION_PREFIXES = ["PlayerCharacter"];
prepareBaseData() { prepareBaseData() {
super.prepareBaseData(); super.prepareBaseData();
let effectsToApply = this.gatherEffects(); let effectsToApply = this.gatherEffects();

View File

@ -0,0 +1 @@
export * from "./actor-sheet.mjs"

View File

@ -1,4 +1,4 @@
const {api, sheet} = foundry.applications; const {api, sheets} = foundry.applications;
export default class BaseActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorSheetV2) { 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`; return `systems/kidsonbrooms/templates/actor/actor-sheet-{$this.actor.type}.html`;
} }
async getData()
{
const context = super.getData();
console.log(context);
return context;
}
} }

View File

@ -0,0 +1,5 @@
<form class="{{cssClass}} {{actor.type}} flexcol" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100" />
</header>
</form>

View File

@ -1,5 +0,0 @@
<section class="sheet-header flexcol"></section>
<header class="title flexrow">
<input class="charname" name="name" type="text" value="{{source.name}}" placeholder="Actor Name">
</div>
</section>