.dungeon/module/sheets/GenericSheet.mjs

20 lines
No EOL
442 B
JavaScript

export class GenericSheet extends ActorSheet {
#propogatedSettings = [
`devMode`,
`showAvatarOnSheet`,
`playersCanChangeGroup`,
`resourcesOrSupplies`,
];
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;
}
}