From 0d4fdf11e30b1bf68760a06220757b96de99d0b3 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 18 Jan 2024 23:29:07 +0000 Subject: [PATCH] include handling armors without plates --- project/src/generators/LootGenerator.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/project/src/generators/LootGenerator.ts b/project/src/generators/LootGenerator.ts index 5973ceaf..d6b170d1 100644 --- a/project/src/generators/LootGenerator.ts +++ b/project/src/generators/LootGenerator.ts @@ -155,6 +155,15 @@ export class LootGenerator const plateDb = this.itemHelper.getItem(helmetTop._tpl); return options.armorLevelWhitelist.includes(Number.parseInt(plateDb[1]._props.armorClass as any)); } + + const softArmorFront = armor._items.find(mod => mod?.slotId?.toLowerCase() === "soft_armor_front"); + if (softArmorFront) + { + const plateDb = this.itemHelper.getItem(softArmorFront._tpl); + return options.armorLevelWhitelist.includes(Number.parseInt(plateDb[1]._props.armorClass as any)); + } + + return false; } /**