29 lines
716 B
C#
29 lines
716 B
C#
using Barotrauma.Networking;
|
|
using Lidgren.Network;
|
|
using System.Linq;
|
|
using System.Xml.Linq;
|
|
|
|
namespace Barotrauma.Items.Components
|
|
{
|
|
partial class Deconstructor : Powered, IServerSerializable, IClientSerializable
|
|
{
|
|
public void ServerRead(ClientNetObject type, NetBuffer msg, Client c)
|
|
{
|
|
bool active = msg.ReadBoolean();
|
|
|
|
item.CreateServerEvent(this);
|
|
|
|
if (item.CanClientAccess(c))
|
|
{
|
|
SetActive(active, c.Character);
|
|
}
|
|
}
|
|
|
|
public void ServerWrite(NetBuffer msg, Client c, object[] extraData = null)
|
|
{
|
|
msg.Write(IsActive);
|
|
msg.Write(progressTimer);
|
|
}
|
|
}
|
|
}
|