From f249d7058ccdf14c3ee4453f0f2cbc71eadfebbf Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 23 Mar 2024 11:32:10 +0000 Subject: [PATCH] Adjust `calculateAmmoStackSizeThatFitsBudget()` to never let the ammo reward stack go below 1 --- project/src/generators/RepeatableQuestRewardGenerator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/src/generators/RepeatableQuestRewardGenerator.ts b/project/src/generators/RepeatableQuestRewardGenerator.ts index 453b9d90..e3170aff 100644 --- a/project/src/generators/RepeatableQuestRewardGenerator.ts +++ b/project/src/generators/RepeatableQuestRewardGenerator.ts @@ -336,7 +336,8 @@ export class RepeatableQuestRewardGenerator // Get itemDbs max stack size for ammo - don't go above 100 (some mods mess around with stack sizes) const stackMaxCount = Math.min(itemSelected._props.StackMaxSize, 100); - return Math.min(stackSizeThatFitsBudget, stackMaxCount); + // Don't let result fall below 1 + return Math.max(1, Math.min(stackSizeThatFitsBudget, stackMaxCount)); } /**