Begin working on the non-MVP character sheet
This commit is contained in:
parent
d74416c620
commit
6d2d02b077
10 changed files with 110 additions and 5 deletions
47
module/sheets/Actors/PC/Improved.mjs
Normal file
47
module/sheets/Actors/PC/Improved.mjs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { GenericActorSheet } from "../../GenericActorSheet.mjs";
|
||||
|
||||
export class PlayerSheetv2 extends GenericActorSheet {
|
||||
static get defaultOptions() {
|
||||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
{
|
||||
template: `systems/dotdungeon/templates/actors/char-sheet/v2/sheet.hbs`,
|
||||
tabs: [
|
||||
{
|
||||
// group: `page`,
|
||||
navSelector: `.potato`,
|
||||
contentSelector: `.tab-content`,
|
||||
initial: `tab1`,
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
opts.classes.push(`dotdungeon`);
|
||||
return opts;
|
||||
};
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
if (this.document.isEmbedded) return;
|
||||
if (!this.isEditable) return;
|
||||
console.debug(`.dungeon | Adding event listeners for Actor: ${this.id}`);
|
||||
};
|
||||
|
||||
async getData() {
|
||||
const ctx = await super.getData();
|
||||
/** @type {ActorHandler} */
|
||||
const actor = this.actor;
|
||||
|
||||
ctx.system = actor.system;
|
||||
ctx.flags = actor.flags;
|
||||
ctx.items = this.actor.itemTypes;
|
||||
|
||||
ctx.computed = {
|
||||
canChangeGroup: ctx.settings.playersCanChangeGroup || ctx.isGM,
|
||||
canAddAspect: !await actor.proxyFunction.bind(actor)(`atAspectLimit`),
|
||||
};
|
||||
|
||||
return ctx;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue