From 596785eda9a5e2faf56c79c65d8fb9e26590e594 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 8 Feb 2024 21:31:46 +0000 Subject: [PATCH] Added support for ammo box hydration on fence --- project/src/generators/FenceBaseAssortGenerator.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/src/generators/FenceBaseAssortGenerator.ts b/project/src/generators/FenceBaseAssortGenerator.ts index e3a76778..d0d612c6 100644 --- a/project/src/generators/FenceBaseAssortGenerator.ts +++ b/project/src/generators/FenceBaseAssortGenerator.ts @@ -6,6 +6,7 @@ import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; +import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { Money } from "@spt-aki/models/enums/Money"; import { Traders } from "@spt-aki/models/enums/Traders"; @@ -88,6 +89,11 @@ export class FenceBaseAssortGenerator upd: { StackObjectsCount: 9999999 }, }]; + if (this.itemHelper.isOfBaseclass(rootItemDb._id, BaseClasses.AMMO_BOX)) + { + this.itemHelper.addCartridgesToAmmoBox(itemWithChildrenToAdd, rootItemDb); + } + // Ensure IDs are unique this.itemHelper.remapRootItemId(itemWithChildrenToAdd); if (itemWithChildrenToAdd.length > 1)