Remove redundant check in loop
This commit is contained in:
parent
e48c4a8e10
commit
d8806be534
1 changed files with 5 additions and 7 deletions
|
|
@ -140,20 +140,18 @@ export class BookGeistSheet extends
|
||||||
if (!armour) { continue }
|
if (!armour) { continue }
|
||||||
const defense = {
|
const defense = {
|
||||||
name: localizer(`RipCrypt.common.anatomy.${location}`),
|
name: localizer(`RipCrypt.common.anatomy.${location}`),
|
||||||
tooltip: null,
|
armourUUID: armour.uuid,
|
||||||
protection: 0,
|
tooltip: armour.name,
|
||||||
|
protection: armour.system.protection,
|
||||||
shielded: false,
|
shielded: false,
|
||||||
};
|
};
|
||||||
if (armour) {
|
|
||||||
defense.armourUUID = armour.uuid;
|
|
||||||
defense.tooltip = armour.name,
|
|
||||||
defense.protection = armour.system.protection;
|
|
||||||
}
|
|
||||||
if (shield?.system.location.has(location)) {
|
if (shield?.system.location.has(location)) {
|
||||||
defense.shieldUUID = shield.uuid;
|
defense.shieldUUID = shield.uuid;
|
||||||
defense.shielded = true;
|
defense.shielded = true;
|
||||||
defense.protection += shield.system.protection;
|
defense.protection += shield.system.protection;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (defense.protection > 0) {
|
if (defense.protection > 0) {
|
||||||
defenses.push(defense);
|
defenses.push(defense);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue