Unstable 0.1500.5.0 (almost forgor edition 💀)

This commit is contained in:
Markus Isberg
2021-10-01 23:56:14 +09:00
parent 3043a9a7bc
commit 08bdfc6cea
150 changed files with 5669 additions and 4403 deletions
@@ -0,0 +1,21 @@
using Barotrauma.Networking;
namespace Barotrauma
{
partial class AlienRuinMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
msg.Write((ushort)existingTargets.Count);
foreach (var t in existingTargets)
{
msg.Write(t != null ? t.ID : Entity.NullEntityID);
}
msg.Write((ushort)spawnedTargets.Count);
foreach (var t in spawnedTargets)
{
t.WriteSpawnData(msg, t.ID, false);
}
}
}
}
@@ -17,5 +17,10 @@ namespace Barotrauma
}
public abstract void ServerWriteInitial(IWriteMessage msg, Client c);
public virtual void ServerWrite(IWriteMessage msg)
{
msg.Write((ushort)State);
}
}
}
@@ -0,0 +1,36 @@
using Barotrauma.Networking;
namespace Barotrauma
{
partial class ScanMission : Mission
{
public override void ServerWriteInitial(IWriteMessage msg, Client 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);
}
}
}
}