From d26aed483c42baaa30f57311dd9a588636c34cd0 Mon Sep 17 00:00:00 2001 From: Matheus Clemente Date: Sun, 19 Nov 2023 21:29:39 -0300 Subject: [PATCH] Remove threshold for filtering users on dnd5e/pf2e Fix #339. --- src/module/providers/dnd5e.js | 2 +- src/module/providers/pf2e.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/providers/dnd5e.js b/src/module/providers/dnd5e.js index 249b049..a52896e 100644 --- a/src/module/providers/dnd5e.js +++ b/src/module/providers/dnd5e.js @@ -213,7 +213,7 @@ export default class dnd5eLanguageProvider extends LanguageProvider { filterUsers(ownedActors) { const filtered = super.filterUsers(ownedActors); const party = game.actors.find((a) => a.id === game.settings.get("polyglot", "DND5E.TargetedParty")); - if (filtered.length > 10 && party?.system?.members.size) { + if (party?.system?.members.size) { const members = Array.from(party.system.members.map((a) => a.id)); const users = filtered.filter((u) => ownedActors.some((actor) => members.includes(actor.id) && actor.testUserPermission(u, "OWNER")) ); diff --git a/src/module/providers/pf2e.js b/src/module/providers/pf2e.js index ace658a..24494ef 100644 --- a/src/module/providers/pf2e.js +++ b/src/module/providers/pf2e.js @@ -206,7 +206,7 @@ export default class pf2eLanguageProvider extends LanguageProvider { filterUsers(ownedActors) { const filtered = super.filterUsers(ownedActors); const party = game.actors.find((a) => a.id === game.settings.get("polyglot", "PF2E.TargetedParty")); - if (filtered.length > 10 && party?.members.length) { + if (party?.members.length) { const members = party.members.map((a) => a.id); const users = filtered.filter((u) => ownedActors.some((actor) => members.includes(actor.id) && actor.testUserPermission(u, "OWNER")) );