Paramétrage des compendiums de recherche
This commit is contained in:
@ -52,6 +52,10 @@ export class SystemCompendiums extends FormApplication {
|
||||
}
|
||||
|
||||
static getPack(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
if (pack) {
|
||||
return pack;
|
||||
}
|
||||
return game.packs.get(SystemCompendiums.getCompendium(compendium)) ?? game.packs.get(SystemCompendiums._getDefaultCompendium(compendium));
|
||||
}
|
||||
|
||||
@ -187,7 +191,7 @@ export class CompendiumTable {
|
||||
async getContent(itemFrequence = it => it.system.frequence, filter = it => true) {
|
||||
return await SystemCompendiums.getContent(this.compendium,
|
||||
this.type,
|
||||
it => (!this.subTypes || this.subTypes.includes(it.type)) && filter(it),
|
||||
it => (!this.subTypes || this.subTypes.includes(it.type)) && itemFrequence(it) > 0 && filter(it),
|
||||
itemFrequence,
|
||||
this.sorting);
|
||||
}
|
||||
|
Reference in New Issue
Block a user