Update location of sheets to keep them more organized
This commit is contained in:
parent
6fbb480f83
commit
e284529a45
5 changed files with 7 additions and 5 deletions
|
|
@ -1,41 +0,0 @@
|
|||
import DOTDUNGEON from "../config.mjs";
|
||||
|
||||
export class GenericItemSheet extends ItemSheet {
|
||||
_expanded = new Set();
|
||||
|
||||
#propogatedSettings = [
|
||||
`devMode`,
|
||||
`showAvatarOnSheet`,
|
||||
`playersCanChangeGroup`,
|
||||
`resourcesOrSupplies`,
|
||||
];
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
if (!this.isEditable) return;
|
||||
console.debug(`.dungeon | Adding event listeners for Generic Item: ${this.id}`);
|
||||
};
|
||||
|
||||
async getData() {
|
||||
const ctx = {};
|
||||
|
||||
// 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);
|
||||
};
|
||||
|
||||
ctx.isGM = game.users.current.hasRole(CONST.USER_ROLES.ASSISTANT);
|
||||
|
||||
ctx.meta = {
|
||||
expanded: this._expanded,
|
||||
idp: this.item.uuid,
|
||||
};
|
||||
|
||||
ctx.config = DOTDUNGEON;
|
||||
ctx.icons = CONFIG.CACHE.icons;
|
||||
|
||||
return ctx;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue