feat: add a special actor sheet that is displayed to users with the LIMITED permission for the actor

This actor sheet only shows image, name, and biography/description of the actor.
This commit is contained in:
Johannes Loher 2022-11-03 23:02:46 +01:00
parent 63e888e39d
commit fc9f4b49b5
9 changed files with 52 additions and 4 deletions

View file

@ -39,6 +39,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Options, DS4ActorSheetD
override get template(): string {
const basePath = "systems/ds4/templates/sheets/actor";
if (!getGame().user?.isGM && this.actor.limited) return `${basePath}/limited-sheet.hbs`;
return `${basePath}/${this.actor.data.type}-sheet.hbs`;
}

View file

@ -18,6 +18,7 @@ export default async function registerHandlebarsPartials(): Promise<void> {
"systems/ds4/templates/sheets/actor/components/core-values.hbs",
"systems/ds4/templates/sheets/actor/components/creature-properties.hbs",
"systems/ds4/templates/sheets/actor/components/currency.hbs",
"systems/ds4/templates/sheets/actor/components/description.hbs",
"systems/ds4/templates/sheets/actor/components/effect-list-entry.hbs",
"systems/ds4/templates/sheets/actor/components/effect-list-header.hbs",
"systems/ds4/templates/sheets/actor/components/item-list-entry.hbs",