Added "user" parameter to Inventory.PutItem and Inventory.TryPutItem. + More descriptive wiring logging: the logs don't list all the wires in a connectionpanel but only the changes a player does to the wiring. Disconnecting wires by picking them up and wiring done by the host are also logged now.
This commit is contained in:
@@ -470,7 +470,7 @@ namespace Barotrauma
|
||||
foreach (Item containedItem in ContainedItems)
|
||||
{
|
||||
var containedClone = containedItem.Clone();
|
||||
clone.ownInventory.TryPutItem(containedClone as Item);
|
||||
clone.ownInventory.TryPutItem(containedClone as Item, null);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
@@ -1520,11 +1520,11 @@ namespace Barotrauma
|
||||
if (inventory != null)
|
||||
{
|
||||
if (inventorySlotIndex >= 0 && inventorySlotIndex < 255 &&
|
||||
inventory.TryPutItem(item, inventorySlotIndex, false, false))
|
||||
inventory.TryPutItem(item, inventorySlotIndex, false, null, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
inventory.TryPutItem(item, item.AllowedSlots, false);
|
||||
inventory.TryPutItem(item, null, item.AllowedSlots, false);
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
Reference in New Issue
Block a user