49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
#nullable disable
|
|
public class TileEntityWorkstationRebirth : TileEntityWorkstation
|
|
{
|
|
|
|
public TileEntityWorkstationRebirth(Chunk _chunk)
|
|
: base(_chunk)
|
|
{
|
|
this.fuel = ItemStack.CreateArray(3);
|
|
this.tools = ItemStack.CreateArray(3);
|
|
this.output = ItemStack.CreateArray(6);
|
|
this.input = ItemStack.CreateArray(3);
|
|
this.lastInput = ItemStack.CreateArray(3);
|
|
this.queue = new RecipeQueueItem[4];
|
|
this.materialNames = new string[0];
|
|
this.isModuleUsed = new bool[5];
|
|
this.currentMeltTimesLeft = new float[this.input.Length];
|
|
this.ownerID = (PlatformUserIdentifierAbs)null;
|
|
}
|
|
|
|
[PublicizedFrom(EAccessModifier.Private)]
|
|
public PlatformUserIdentifierAbs ownerID;
|
|
|
|
public void SetOwner(PlatformUserIdentifierAbs _userIdentifier)
|
|
{
|
|
this.ownerID = _userIdentifier;
|
|
this.setModified();
|
|
}
|
|
public PlatformUserIdentifierAbs GetOwner() => this.ownerID;
|
|
|
|
public bool IsOwner(PlatformUserIdentifierAbs _userIdentifier)
|
|
{
|
|
return _userIdentifier != null && _userIdentifier.Equals(this.ownerID);
|
|
}
|
|
|
|
public override void read(PooledBinaryReader _br, TileEntity.StreamModeRead _eStreamMode)
|
|
{
|
|
base.read(_br, _eStreamMode);
|
|
this.ownerID = PlatformUserIdentifierAbs.FromStream((BinaryReader)_br);
|
|
}
|
|
|
|
public override void write(PooledBinaryWriter _bw, TileEntity.StreamModeWrite _eStreamMode)
|
|
{
|
|
base.write(_bw, _eStreamMode);
|
|
this.ownerID.ToStream((BinaryWriter)_bw);
|
|
}
|
|
|
|
|
|
}
|