From 12651938ed717f210d73480e1ff57cf27772c3c8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 21 Apr 2026 23:39:14 -0600 Subject: [PATCH] Prevent attribute Items from showing up in the Items tab of actor sheets --- module/apps/PlayerSheet.mjs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/module/apps/PlayerSheet.mjs b/module/apps/PlayerSheet.mjs index 7d1ceae..a2c4aad 100644 --- a/module/apps/PlayerSheet.mjs +++ b/module/apps/PlayerSheet.mjs @@ -126,8 +126,16 @@ export class PlayerSheet extends return true; }; + get hasAttributesTab() { + return this.actor.itemTypes.attributes + .filter(attr => !attr.system.aboveTheFold) + .length > 0; + }; + get hasItemsTab() { - return this.actor.items.size > 0; + return this.actor.items + .filter(item => item.type !== `attribute`) + .length > 0; }; // #endregion Instance Data @@ -321,6 +329,10 @@ export class PlayerSheet extends ctx.itemGroups = []; for (const [groupName, items] of Object.entries(this.actor.itemTypes)) { + + // We don't care about attribute items here + if (groupName === `attribute`) { continue }; + const preparedItems = []; let summedWeight = 0;