Généralisation des fréquences
Tout objet d'inventaire a une fréquence (en ville/village, ou autre milieu)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { SYSTEM_RDD } from "./constants.js";
|
||||
|
||||
export class RddCompendiumOrganiser {
|
||||
export class RdDCompendiumOrganiser {
|
||||
static init() {
|
||||
Hooks.on('renderCompendium', async (pack, html, compendiumData) => RddCompendiumOrganiser.onRenderCompendium(pack, html, compendiumData))
|
||||
Hooks.on('renderCompendium', async (pack, html, compendiumData) => RdDCompendiumOrganiser.onRenderCompendium(pack, html, compendiumData))
|
||||
}
|
||||
|
||||
static async onRenderCompendium(compendium, html, compendiumData) {
|
||||
@ -10,14 +10,14 @@ export class RddCompendiumOrganiser {
|
||||
const pack = compendium.collection
|
||||
if (pack.metadata.system === SYSTEM_RDD) {
|
||||
html.find('.directory-item').each((i, element) => {
|
||||
RddCompendiumOrganiser.setEntityTypeName(pack, element);
|
||||
RdDCompendiumOrganiser.setEntityTypeName(pack, element);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static async setEntityTypeName(pack, element) {
|
||||
const label = RddCompendiumOrganiser.getEntityTypeLabel(await pack.getDocument(element.dataset.documentId));
|
||||
RddCompendiumOrganiser.insertEntityType(element, label);
|
||||
const label = RdDCompendiumOrganiser.getEntityTypeLabel(await pack.getDocument(element.dataset.documentId));
|
||||
RdDCompendiumOrganiser.insertEntityType(element, label);
|
||||
}
|
||||
|
||||
static insertEntityType(element, label) {
|
||||
|
Reference in New Issue
Block a user