Update location of sheets to keep them more organized

This commit is contained in:
Oliver-Akins 2024-02-04 20:04:26 -07:00
parent 6fbb480f83
commit e284529a45
5 changed files with 7 additions and 5 deletions

View file

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