Rename existing PC sheet to make it more obvious it's the MVP
This commit is contained in:
parent
b123bea62c
commit
d74416c620
2 changed files with 4 additions and 3 deletions
43
module/sheets/MVPPCSheet.mjs
Normal file
43
module/sheets/MVPPCSheet.mjs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { ActorHandler } from "../documents/Actor/Handler.mjs";
|
||||
import { GenericActorSheet } from "./GenericActorSheet.mjs";
|
||||
|
||||
export class MVPPCSheet extends GenericActorSheet {
|
||||
|
||||
/** @override {ActorHandler} actor */
|
||||
|
||||
static get defaultOptions() {
|
||||
let opts = mergeObject(
|
||||
super.defaultOptions,
|
||||
{
|
||||
template: `systems/dotdungeon/templates/actors/char-sheet-mvp/sheet.hbs`
|
||||
}
|
||||
);
|
||||
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