forked from public/foundryvtt-reve-de-dragon
Adaptation Feuilles Acteurs
This commit is contained in:
@ -36,14 +36,14 @@ export class RddCompendiumOrganiser {
|
||||
Hooks.on('renderCompendium', async (pack, html, data) => RddCompendiumOrganiser.onRenderCompendium(pack, html, data))
|
||||
}
|
||||
|
||||
static async onRenderCompendium(pack, html, data) {
|
||||
console.log('onRenderCompendium', pack, html, data);
|
||||
static async onRenderCompendium(compendium, html, data) {
|
||||
console.log('onRenderCompendium', compendium, html, data);
|
||||
let pack = compendium.collection
|
||||
if (pack.metadata.system === 'foundryvtt-reve-de-dragon') {
|
||||
const content = await pack.getContent();
|
||||
|
||||
html.find('.directory-item').each((i, element) => {
|
||||
let entity = content.find(it => it._id === element.dataset.entryId);
|
||||
|
||||
let entity = pack.get(element.dataset.documentId);
|
||||
if (entity?.entity === 'Actor' || entity?.entity === 'Item') {
|
||||
const typeName = typeDisplayName[entity.data.type] ?? Misc.upperFirst(entity.data.type);
|
||||
RddCompendiumOrganiser.insertEntityType(element, typeName);
|
||||
|
Reference in New Issue
Block a user