Remove redundant check in loop

This commit is contained in:
Oliver 2025-12-25 16:15:04 -07:00
parent e48c4a8e10
commit d8806be534

View file

@ -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);
};