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;