From d92f30d281bbe3dc0bf3d01403eb062e56b98815 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 12 Jan 2024 12:32:04 +0000 Subject: [PATCH] Fix insurance return all child items of an item (ammo in mags/chamber) --- project/assets/configs/insurance.json | 1 + project/src/services/InsuranceService.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/project/assets/configs/insurance.json b/project/assets/configs/insurance.json index b97c8f48..a116b65c 100644 --- a/project/assets/configs/insurance.json +++ b/project/assets/configs/insurance.json @@ -8,6 +8,7 @@ "54cb57776803fa99248b456e": 85 }, "blacklistedEquipment": ["SpecialSlot1", "SpecialSlot2", "SpecialSlot3"], + "slotIdsToAlwaysRemove": ["cartridges", "patron_in_weapon"], "returnTimeOverrideSeconds": 0, "runIntervalSeconds": 600 } diff --git a/project/src/services/InsuranceService.ts b/project/src/services/InsuranceService.ts index b1afff83..638b3209 100644 --- a/project/src/services/InsuranceService.ts +++ b/project/src/services/InsuranceService.ts @@ -302,6 +302,12 @@ export class InsuranceService if (itemClientInsuranceData || itemIsSoftInsert) { + // Check if item should always be lost + if (this.insuranceConfig.slotIdsToAlwaysRemove.includes(preRaidItem.slotId.toLowerCase())) + { + continue; + } + // Get baseline item to return, clone pre-raid item const itemToReturn: Item = this.jsonUtil.clone(preRaidItem);