v0.11.0.9

This commit is contained in:
Joonas Rikkonen
2020-12-09 16:34:16 +02:00
parent bbf06f0984
commit f433a7ba10
325 changed files with 13947 additions and 3652 deletions
@@ -0,0 +1,15 @@
using Barotrauma.Networking;
using System;
using System.Collections.Generic;
using System.Text;
namespace Barotrauma
{
partial class BeaconMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
return;
}
}
}
@@ -10,7 +10,7 @@ namespace Barotrauma
foreach (Item item in items)
{
item.WriteSpawnData(msg,
item.OriginalID,
item.ID,
parentInventoryIDs.ContainsKey(item) ? parentInventoryIDs[item] : Entity.NullEntityID,
parentItemContainerIndices.ContainsKey(item) ? parentItemContainerIndices[item] : (byte)0);
}
@@ -0,0 +1,31 @@
using Barotrauma.Networking;
namespace Barotrauma
{
partial class MineralMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
foreach (var kvp in SpawnedResources)
{
msg.Write((byte)kvp.Value.Count);
var rotation = ResourceClusters[kvp.Key].Second;
msg.Write(rotation);
foreach (var r in kvp.Value)
{
r.WriteSpawnData(msg, r.ID, Entity.NullEntityID, 0);
}
}
foreach (var kvp in RelevantLevelResources)
{
msg.Write(kvp.Key);
msg.Write((byte)kvp.Value.Length);
foreach (var i in kvp.Value)
{
msg.Write(i.ID);
}
}
}
}
}
@@ -15,7 +15,7 @@ namespace Barotrauma
msg.Write((byte)monsters.Count);
foreach (Character monster in monsters)
{
monster.WriteSpawnData(msg, monster.OriginalID, restrictMessageSize: false);
monster.WriteSpawnData(msg, monster.ID, restrictMessageSize: false);
}
}
}
@@ -0,0 +1,18 @@
using Barotrauma.Networking;
namespace Barotrauma
{
partial class NestMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
msg.Write(nestPosition.X);
msg.Write(nestPosition.Y);
msg.Write((ushort)items.Count);
foreach (Item item in items)
{
item.WriteSpawnData(msg, item.ID, Entity.NullEntityID, 0);
}
}
}
}
@@ -18,11 +18,11 @@ namespace Barotrauma
msg.Write(usedExistingItem);
if (usedExistingItem)
{
msg.Write(item.OriginalID);
msg.Write(item.ID);
}
else
{
item.WriteSpawnData(msg, item.OriginalID, originalInventoryID, originalItemContainerIndex);
item.WriteSpawnData(msg, item.ID, originalInventoryID, originalItemContainerIndex);
}
msg.Write((byte)executedEffectIndices.Count);