From fd14338f5abf52bac273b8edab6b5943a8152d8e Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 14 Dec 2023 18:19:50 +0000 Subject: [PATCH] Exit `isItemIncompatibleWithCurrentItems()` function if item doesnt exist in db or has no _props field --- project/src/helpers/BotGeneratorHelper.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/src/helpers/BotGeneratorHelper.ts b/project/src/helpers/BotGeneratorHelper.ts index 3390c352..c64fdd4e 100644 --- a/project/src/helpers/BotGeneratorHelper.ts +++ b/project/src/helpers/BotGeneratorHelper.ts @@ -307,6 +307,8 @@ export class BotGeneratorHelper slot: equipmentSlot, }), ); + + return { incompatible: true, reason: `item: ${tplToCheck} does not exist in the database` }; } if (!itemToCheck._props) @@ -318,6 +320,8 @@ export class BotGeneratorHelper slot: equipmentSlot, }), ); + + return { incompatible: true, reason: `item: ${tplToCheck} does not have a _props field` }; } // Does an equipped item have a property that blocks the desired item - check for prop "BlocksX" .e.g BlocksEarpiece / BlocksFaceCover