From 8ca0c5d82b656e84c856933db1092e5eb107ae5c Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 27 Jan 2024 17:08:01 +0000 Subject: [PATCH] Remove faceshield from headwear section --- project/assets/configs/bot.json | 1 - project/src/generators/BotEquipmentModGenerator.ts | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/project/assets/configs/bot.json b/project/assets/configs/bot.json index 5942238f..c7c990bc 100644 --- a/project/assets/configs/bot.json +++ b/project/assets/configs/bot.json @@ -1426,7 +1426,6 @@ "5e00c1ad86f774747333222c": 1, "5e01ef6886f77445f643baa4": 1, "5ea17ca01412a1425304d1c0": 1, - "5c0919b50db834001b7ce3b9": 1, "5ea05cf85ad9772e6624305d": 330, "5c0d2727d174af02a012cf58": 250, "59e7711e86f7746cae05fbe1": 250, diff --git a/project/src/generators/BotEquipmentModGenerator.ts b/project/src/generators/BotEquipmentModGenerator.ts index a0d93815..380a9ce0 100644 --- a/project/src/generators/BotEquipmentModGenerator.ts +++ b/project/src/generators/BotEquipmentModGenerator.ts @@ -780,14 +780,28 @@ export class BotEquipmentModGenerator incompatible: false, reason: "", }; + const modParentFilterList = parentSlot._props.filters[0].Filter; while (exhaustableModPool.hasValues()) { modTpl = exhaustableModPool.getRandomValue(); + if (modSpawnResult === ModSpawn.DEFAULT_MOD && modPool.length === 1) + { + // default mod wanted and only one choice + found = true; + + break; + } + modCompatibilityResult = this.botGeneratorHelper.isItemIncompatibleWithCurrentItems( weapon, modTpl, modSlot, ); + const isOnModParentFilterList = modParentFilterList.includes(modTpl); + if (!isOnModParentFilterList) + { + continue; + } if (!modCompatibilityResult.incompatible && !this.weaponModComboIsIncompatible(weapon, modTpl)) { found = true;