Release v0.15.12.0

This commit is contained in:
Joonas Rikkonen
2021-10-27 18:50:57 +03:00
parent bf95e82d80
commit 234fb6bc06
450 changed files with 26042 additions and 10457 deletions
@@ -0,0 +1,37 @@
using Barotrauma.Networking;
namespace Barotrauma
{
partial class ScanMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
base.ServerWriteInitial(msg, c);
msg.Write((ushort)startingItems.Count);
foreach (var item in startingItems)
{
item.WriteSpawnData(msg,
item.ID,
parentInventoryIDs.ContainsKey(item) ? parentInventoryIDs[item] : Entity.NullEntityID,
parentItemContainerIndices.ContainsKey(item) ? parentItemContainerIndices[item] : (byte)0);
}
ServerWriteScanTargetStatus(msg);
}
public override void ServerWrite(IWriteMessage msg)
{
base.ServerWrite(msg);
ServerWriteScanTargetStatus(msg);
}
private void ServerWriteScanTargetStatus(IWriteMessage msg)
{
msg.Write((byte)scanTargets.Count);
foreach (var kvp in scanTargets)
{
msg.Write(kvp.Key != null ? kvp.Key.ID : Entity.NullEntityID);
msg.Write(kvp.Value);
}
}
}
}