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; }; };