Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaServer/Source/Items/Components/Machines/Deconstructor.cs
2019-07-27 20:20:43 +03:00

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);
}
}
}