Don't show unusable non-weapons in character sidebar (#1862)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
Carlos Fernandez 2026-05-04 06:40:29 -04:00 committed by GitHub
parent 2ffe678503
commit 0128106de6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -228,7 +228,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
context.resources.stress.max < maxResource ? maxResource - context.resources.stress.max : 0; context.resources.stress.max < maxResource ? maxResource - context.resources.stress.max : 0;
context.equippedItems = sortBy( context.equippedItems = sortBy(
this.document.items.filter(i => i.system.equipped), this.document.items.filter(i => i.system.equipped && (i.type === 'weapon' || i.usable)),
i => (i.type === 'weapon' ? (i.system.secondary ? 1 : 0) : 2) i => (i.type === 'weapon' ? (i.system.secondary ? 1 : 0) : 2)
); );