Build 0.20.15.0

This commit is contained in:
Markus Isberg
2022-12-14 13:44:15 +02:00
parent 6f788fb8b4
commit 2f7205fb4b
12 changed files with 101 additions and 62 deletions
@@ -118,7 +118,11 @@ namespace Barotrauma
Abandon = true;
return;
}
ItemToContain = item ?? character.Inventory.FindItem(i => CheckItem(i) && i.Container != container.Item, recursive: true);
ItemToContain = item ?? character.Inventory.FindItem(it =>
CheckItem(it) &&
//ignore items already in the container, unless we're trying to place to a specific slot, and the item's not in it
(it.Container != container.Item || (TargetSlot.HasValue && it.Container.OwnInventory.FindIndex(it) != TargetSlot)),
recursive: true);
if (ItemToContain != null)
{
if (!character.CanInteractWith(ItemToContain, checkLinked: false))