diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs index 633916804..b281ff3bb 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs @@ -442,7 +442,8 @@ namespace Barotrauma if (draggingItemToWorld) { if (item.OwnInventory == null || - !item.OwnInventory.CanBePut(CharacterInventory.draggingItem)) + !item.OwnInventory.CanBePut(CharacterInventory.draggingItem) || + !CanAccessInventory(item.OwnInventory)) { continue; } diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs index 1ee54d3a3..504a9cd2e 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs @@ -1519,10 +1519,9 @@ namespace Barotrauma if (inventory.Owner is Item) { var owner = (Item)inventory.Owner; - if (!CanInteractWith(owner)) - { - return false; - } + if (!CanInteractWith(owner)) { return false; } + ItemContainer container = owner.GetComponents().FirstOrDefault(ic => ic.Inventory == inventory); + if (container != null && !container.HasRequiredItems(this, addMessage: false)) { return false; } } return true; }