Exit isItemIncompatibleWithCurrentItems() function if item doesnt exist in db or has no _props field

This commit is contained in:
Dev 2023-12-14 18:19:50 +00:00
parent 88c4cf949c
commit fd14338f5a

View File

@ -307,6 +307,8 @@ export class BotGeneratorHelper
slot: equipmentSlot, slot: equipmentSlot,
}), }),
); );
return { incompatible: true, reason: `item: ${tplToCheck} does not exist in the database` };
} }
if (!itemToCheck._props) if (!itemToCheck._props)
@ -318,6 +320,8 @@ export class BotGeneratorHelper
slot: equipmentSlot, 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 // Does an equipped item have a property that blocks the desired item - check for prop "BlocksX" .e.g BlocksEarpiece / BlocksFaceCover