From d8806be5349e4b23419c7dfce97753ecb167a631 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 25 Dec 2025 16:15:04 -0700 Subject: [PATCH] Remove redundant check in loop --- module/Apps/ActorSheets/BookGeistSheet.mjs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/module/Apps/ActorSheets/BookGeistSheet.mjs b/module/Apps/ActorSheets/BookGeistSheet.mjs index 8763ef3..14fa742 100644 --- a/module/Apps/ActorSheets/BookGeistSheet.mjs +++ b/module/Apps/ActorSheets/BookGeistSheet.mjs @@ -140,20 +140,18 @@ export class BookGeistSheet extends if (!armour) { continue } const defense = { name: localizer(`RipCrypt.common.anatomy.${location}`), - tooltip: null, - protection: 0, + armourUUID: armour.uuid, + tooltip: armour.name, + protection: armour.system.protection, shielded: false, }; - if (armour) { - defense.armourUUID = armour.uuid; - defense.tooltip = armour.name, - defense.protection = armour.system.protection; - } + if (shield?.system.location.has(location)) { defense.shieldUUID = shield.uuid; defense.shielded = true; defense.protection += shield.system.protection; }; + if (defense.protection > 0) { defenses.push(defense); };