diff --git a/project/src/helpers/BotWeaponGeneratorHelper.ts b/project/src/helpers/BotWeaponGeneratorHelper.ts index 885e7f97..5875187f 100644 --- a/project/src/helpers/BotWeaponGeneratorHelper.ts +++ b/project/src/helpers/BotWeaponGeneratorHelper.ts @@ -132,9 +132,15 @@ export class BotWeaponGeneratorHelper ammoItem, ], inventory); - if (result === ItemAddedResult.NO_SPACE) + if (result !== ItemAddedResult.SUCCESS) { - this.logger.debug(`Unable to add ammo: ${ammoItem._tpl} to bot equipment`); + this.logger.debug(`Unable to add ammo: ${ammoItem._tpl} to bot equipment, ${ItemAddedResult[result]}`); + + if (result === ItemAddedResult.NO_SPACE) + { + // If there's no space for 1 stack, there's no space for the others + break; + } } } }