add basic creature sheet

This commit is contained in:
Johannes Loher 2021-01-10 02:05:30 +01:00
parent d416c14cbd
commit 17d0213e62
11 changed files with 120 additions and 20 deletions

View file

@ -75,6 +75,7 @@ interface DS4ActorDataCharacterLanguage {
}
interface DS4ActorDataCharacterProfile {
biography: string;
gender: string;
birthday: string;
birthplace: string;
@ -100,4 +101,5 @@ interface DS4ActorDataCreatureBaseInfo {
creatureType: CreatureType;
sizeCategory: SizeCategory;
experiencePoints: number;
description: string;
}

View file

@ -7,6 +7,24 @@ import { DS4ActorDataType } from "./actor-data";
* @extends {ActorSheet}
*/
export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4ItemDataType> {
/** @override */
static get defaultOptions(): FormApplicationOptions {
return mergeObject(super.defaultOptions, {
classes: ["ds4", "sheet", "actor"],
width: 745,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "inventory" }],
});
}
/** @override */
get template(): string {
const path = "systems/ds4/templates/actor";
return `${path}/${this.actor.data.type}-sheet.hbs`;
}
/* -------------------------------------------- */
/**
* This method returns the data for the template of the actor sheet.
* It explicitly adds the items of the object sorted by type in the
@ -25,17 +43,6 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
return data;
}
/** @override */
static get defaultOptions(): FormApplicationOptions {
return mergeObject(super.defaultOptions, {
classes: ["ds4", "sheet", "actor"],
template: "systems/ds4/templates/actor/actor-sheet.hbs",
width: 745,
height: 600,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "inventory" }],
});
}
/* -------------------------------------------- */
/** @override */