a
This commit is contained in:
parent
bc71b3d2cc
commit
dd42e5487c
@ -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
|
|
||||||
};
|
|
||||||
|
|
||||||
})
|
})
|
@ -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();
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export * from "./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) {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
5
templates/actor/actor-sheet-PlayerCharacter.html
Normal file
5
templates/actor/actor-sheet-PlayerCharacter.html
Normal 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>
|
@ -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>
|
|
Loading…
Reference in New Issue
Block a user