public bool LiquidPlace(Tile checkTile)
{
if (checkTile == null)
return false;
if ((int)checkTile.liquid > 0)
{
switch (checkTile.liquidType())
{
case (byte)0:
case (byte)2:
if (this.WaterPlacement == LiquidPlacement.NotAllowed || this.WaterPlacement == LiquidPlacement.OnlyInFullLiquid && (int)checkTile.liquid != (int)byte.MaxValue)
return false;
break;
case (byte)1:
if (this.LavaPlacement == LiquidPlacement.NotAllowed || this.LavaPlacement == LiquidPlacement.OnlyInFullLiquid && (int)checkTile.liquid != (int)byte.MaxValue)
return false;
break;
}
}
else
{
switch (checkTile.liquidType())
{
case (byte)0:
case (byte)2:
if (this.WaterPlacement == LiquidPlacement.OnlyInFullLiquid || this.WaterPlacement == LiquidPlacement.OnlyInLiquid)
return false;
break;
case (byte)1:
if (this.LavaPlacement == LiquidPlacement.OnlyInFullLiquid || this.LavaPlacement == LiquidPlacement.OnlyInLiquid)
return false;
break;
}
}
return true;
}