Create a generic sheet that my more specific sheets can extend
This commit is contained in:
parent
2026785b09
commit
9d154cb303
2 changed files with 21 additions and 1 deletions
18
module/sheets/GenericSheet.mjs
Normal file
18
module/sheets/GenericSheet.mjs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export class GenericSheet extends ActorSheet {
|
||||
#propogatedSettings = [
|
||||
`devMode`,
|
||||
`showAvatarOnSheet`
|
||||
];
|
||||
|
||||
getData() {
|
||||
const ctx = super.getData();
|
||||
|
||||
// Send all of the settings that sheets need into their context
|
||||
ctx.settings = {};
|
||||
for (const setting of this.#propogatedSettings) {
|
||||
ctx.settings[setting] = game.settings.get(`dotdungeon`, setting);
|
||||
};
|
||||
|
||||
return ctx;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue