Moved MapEntity saving methods to the shared project (the server needs to be able to save subs in the campaign mode)

This commit is contained in:
Joonas Rikkonen
2017-08-30 18:09:48 +03:00
parent dc3b9baa0d
commit 96a64d45dc
26 changed files with 386 additions and 434 deletions
@@ -108,6 +108,18 @@ namespace Barotrauma.Items.Components
}
}
public override XElement Save(XElement parentElement)
{
XElement componentElement = base.Save(parentElement);
foreach (Connection c in Connections)
{
c.Save(componentElement);
}
return componentElement;
}
protected override void RemoveComponentSpecific()
{
foreach (Connection c in Connections)
@@ -140,7 +152,7 @@ namespace Barotrauma.Items.Components
}
}
}
public void ServerRead(ClientNetObject type, NetBuffer msg, Client c)
{
List<Wire>[] wires = new List<Wire>[Connections.Count];