Add actor sheet that is only the attribute list
This commit is contained in:
parent
ba05a0d088
commit
916f7ff589
4 changed files with 27 additions and 1 deletions
17
module/apps/AttributeOnlyPlayerSheet.mjs
Normal file
17
module/apps/AttributeOnlyPlayerSheet.mjs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { PlayerSheet } from "./PlayerSheet.mjs";
|
||||
|
||||
export class AttributeOnlyPlayerSheet extends PlayerSheet {
|
||||
// #region Options
|
||||
static DEFAULT_OPTIONS = {
|
||||
position: {
|
||||
height: `auto`,
|
||||
},
|
||||
};
|
||||
|
||||
static get PARTS() {
|
||||
const parts = super.PARTS;
|
||||
delete parts.content;
|
||||
return parts;
|
||||
};
|
||||
// #endregion Options
|
||||
};
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
import { PlayerSheet } from "./PlayerSheet.mjs";
|
||||
|
||||
export class SingleModePlayerSheet extends PlayerSheet {
|
||||
// #region Data Prep
|
||||
async _prepareContent(ctx) {
|
||||
await super._prepareContent(ctx);
|
||||
ctx.toggled = false;
|
||||
};
|
||||
// #endregion Data Prep
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Apps
|
||||
import { AttributeOnlyPlayerSheet } from "../apps/AttributeOnlyPlayerSheet.mjs";
|
||||
import { PlayerSheet } from "../apps/PlayerSheet.mjs";
|
||||
import { SingleModePlayerSheet } from "../apps/SingleModePlayerSheet.mjs";
|
||||
|
||||
|
|
@ -47,6 +48,11 @@ Hooks.on(`init`, () => {
|
|||
SingleModePlayerSheet,
|
||||
{ label: `taf.sheet-names.SingleModePlayerSheet` },
|
||||
);
|
||||
foundry.documents.collections.Actors.registerSheet(
|
||||
__ID__,
|
||||
AttributeOnlyPlayerSheet,
|
||||
{ label: `taf.sheet-names.AttributeOnlyPlayerSheet` },
|
||||
);
|
||||
|
||||
registerWorldSettings();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue