Extract constants for SYSTEM / SOCKET

This commit is contained in:
Vincent Vandemeulebrouck
2022-01-29 22:49:34 +01:00
parent 3ae3003be3
commit 3abaf4e944
9 changed files with 37 additions and 31 deletions

View File

@ -1,3 +1,4 @@
import { SYSTEM_RDD } from "./constants.js";
import { Misc } from "./misc.js";
export class RddCompendiumOrganiser {
@ -8,7 +9,7 @@ export class RddCompendiumOrganiser {
static async onRenderCompendium(compendium, html, data) {
console.log('onRenderCompendium', compendium, html, data);
const pack = compendium.collection
if (pack.metadata.system === 'foundryvtt-reve-de-dragon') {
if (pack.metadata.system === SYSTEM_RDD) {
html.find('.directory-item').each((i, element) => {
RddCompendiumOrganiser.setEntityTypeName(pack, element);
});