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:
@@ -183,7 +183,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (!containableItems.Any(x => x.MatchesItem(item))) return false;
|
||||
|
||||
if (Inventory.TryPutItem(item))
|
||||
if (Inventory.TryPutItem(item, null))
|
||||
{
|
||||
IsActive = true;
|
||||
if (hideItems && item.body != null) item.body.Enabled = false;
|
||||
@@ -200,10 +200,10 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
for (ushort i = 0; i < itemIds.Length; i++)
|
||||
{
|
||||
Item item = MapEntity.FindEntityByID(itemIds[i]) as Item;
|
||||
Item item = Entity.FindEntityByID(itemIds[i]) as Item;
|
||||
if (item == null) continue;
|
||||
|
||||
Inventory.TryPutItem(item, i, false, false);
|
||||
Inventory.TryPutItem(item, i, false, null, false);
|
||||
}
|
||||
|
||||
itemIds = null;
|
||||
|
||||
Reference in New Issue
Block a user