From f5e51366030049cc45db70e9e4e7ec70d5d297f0 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 2 Dec 2023 19:25:46 +0000 Subject: [PATCH] Fix big that casued bots to spawn with only 1 magazine at most --- project/src/helpers/BotWeaponGeneratorHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/src/helpers/BotWeaponGeneratorHelper.ts b/project/src/helpers/BotWeaponGeneratorHelper.ts index 011a5a05..29a0586e 100644 --- a/project/src/helpers/BotWeaponGeneratorHelper.ts +++ b/project/src/helpers/BotWeaponGeneratorHelper.ts @@ -216,7 +216,7 @@ export class BotWeaponGeneratorHelper // Iterate over each grid in the container and look for a big enough space for the item to be placed in let currentGridCount = 1; - const slotGridCount = containerTemplate[1]._props.Grids.length; + const totalSlotGridCount = containerTemplate[1]._props.Grids.length; for (const slotGrid of containerTemplate[1]._props.Grids) { // Grid is empty, skip @@ -280,7 +280,7 @@ export class BotWeaponGeneratorHelper } // If we've checked all grids in container and reached this point, there's no space for item - if (slotGridCount >= currentGridCount) + if (currentGridCount >= totalSlotGridCount) { return ItemAddedResult.NO_SPACE; }