(f0d812055) v0.9.9.0

This commit is contained in:
Joonas Rikkonen
2020-04-23 19:19:37 +03:00
parent b647059b93
commit ac37a3b0e4
391 changed files with 15054 additions and 5420 deletions
@@ -186,12 +186,12 @@ namespace Barotrauma
if (ContainedItems == null || ContainedItems.All(i => i == null))
{
GameServer.Log(c.Character.LogName + " used item " + Name, ServerLog.MessageType.ItemInteraction);
GameServer.Log(GameServer.CharacterLogName(c.Character) + " used item " + Name, ServerLog.MessageType.ItemInteraction);
}
else
{
GameServer.Log(
c.Character.LogName + " used item " + Name + " (contained items: " + string.Join(", ", ContainedItems.Select(i => i.Name)) + ")",
GameServer.CharacterLogName(c.Character) + " used item " + Name + " (contained items: " + string.Join(", ", ContainedItems.Select(i => i.Name)) + ")",
ServerLog.MessageType.ItemInteraction);
}
@@ -213,7 +213,7 @@ namespace Barotrauma
}
}
public void WriteSpawnData(IWriteMessage msg, UInt16 entityID)
public void WriteSpawnData(IWriteMessage msg, UInt16 entityID, UInt16 originalInventoryID)
{
if (GameMain.Server == null) return;
@@ -227,7 +227,7 @@ namespace Barotrauma
msg.Write(entityID);
if (ParentInventory == null || ParentInventory.Owner == null)
if (ParentInventory == null || ParentInventory.Owner == null || originalInventoryID == 0)
{
msg.Write((ushort)0);
@@ -237,7 +237,7 @@ namespace Barotrauma
}
else
{
msg.Write(ParentInventory.Owner.ID);
msg.Write(originalInventoryID);
//find the index of the ItemContainer this item is inside to get the item to
//spawn in the correct inventory in multi-inventory items like fabricators
@@ -260,6 +260,8 @@ namespace Barotrauma
msg.Write(slotIndex < 0 ? (byte)255 : (byte)slotIndex);
}
msg.Write(body == null ? (byte)0 : (byte)body.BodyType);
byte teamID = 0;
foreach (WifiComponent wifiComponent in GetComponents<WifiComponent>())
{