(6f6fc33e7) The bots having the follow order now also equip mask/diving suit if the follow target has one. Unequipping not yet implemented.

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:47:48 +03:00
parent 21641c63ec
commit 90e1786f92
4 changed files with 14 additions and 25 deletions
@@ -553,6 +553,8 @@ namespace Barotrauma
public static bool HasItem(Character character, string tag, string containedTag, float conditionPercentage = 0)
{
if (character == null) { return false; }
if (character.Inventory == null) { return false; }
var item = character.Inventory.FindItemByTag(tag);
return item != null &&
item.ConditionPercentage > conditionPercentage &&