57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
public class NetPackageCloseTileEntityRebirth : NetPackage
|
|
{
|
|
public NetPackageCloseTileEntityRebirth Setup(int _posX, int _posY, int _posZ)
|
|
{
|
|
//Log.Out("NetPackageCloseVehicleRepairRebirth-Setup");
|
|
this.posX = _posX;
|
|
this.posY = _posY;
|
|
this.posZ = _posZ;
|
|
return this;
|
|
}
|
|
|
|
public override void read(PooledBinaryReader _br)
|
|
{
|
|
//Log.Out("NetPackageCloseVehicleRepairRebirth-read");
|
|
this.posX = _br.ReadInt32();
|
|
this.posY = _br.ReadInt32();
|
|
this.posZ = _br.ReadInt32();
|
|
}
|
|
|
|
public override void write(PooledBinaryWriter _bw)
|
|
{
|
|
//Log.Out("NetPackageCloseVehicleRepairRebirth-write");
|
|
base.write(_bw);
|
|
_bw.Write(this.posX);
|
|
_bw.Write(this.posY);
|
|
_bw.Write(this.posZ);
|
|
}
|
|
|
|
public override void ProcessPackage(World _world, GameManager _callbacks)
|
|
{
|
|
//Log.Out("NetPackageCloseVehicleRepairRebirth-ProcessPackage START");
|
|
if (_world == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Vector3i location = new Vector3i();
|
|
location.x = this.posX;
|
|
location.y = this.posY;
|
|
location.z = this.posZ;
|
|
|
|
if (SingletonMonoBehaviour<ConnectionManager>.Instance.IsServer)
|
|
{
|
|
RebirthUtilities.removeTileEntityAccess(location);
|
|
}
|
|
}
|
|
|
|
public override int GetLength()
|
|
{
|
|
return 4;
|
|
}
|
|
|
|
private int posX = -1;
|
|
private int posY = -1;
|
|
private int posZ = -1;
|
|
}
|