mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-23 16:03:39 +02:00
.
This commit is contained in:
parent
b053af21c6
commit
1ee581055a
9 changed files with 188 additions and 148 deletions
|
|
@ -215,10 +215,10 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
loadItems() {
|
||||
let loadTimeout = this.toggleLoader(true);
|
||||
|
||||
const excludedCompendiumPacks = game.settings.get(
|
||||
const browserSettings = game.settings.get(
|
||||
CONFIG.DH.id,
|
||||
CONFIG.DH.SETTINGS.gameSettings.CompendiumBrowserSettings
|
||||
).excludedCompendiumPacks;
|
||||
);
|
||||
const promises = [];
|
||||
|
||||
game.packs.forEach(pack => {
|
||||
|
|
@ -232,13 +232,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
|
||||
Promise.all(promises).then(async result => {
|
||||
this.items = ItemBrowser.sortBy(
|
||||
result
|
||||
.flatMap(r => r)
|
||||
.filter(x => {
|
||||
const pack = game.packs.get(x.pack);
|
||||
const packageName = pack.metadata.packageType === 'world' ? 'world' : pack.metadata.packageName;
|
||||
return !excludedCompendiumPacks[packageName]?.[x.pack];
|
||||
}),
|
||||
result.flatMap(r => r).filter(r => !browserSettings.isEntryExcluded.bind(browserSettings)(r)),
|
||||
'name'
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue