public override bool ButtonClicked(string name, SegmentEntity targetEntity)
    {
        MSManufacturer port = targetEntity as MSManufacturer;

        if (name == "currentpod")
        {
            if (port.PodType != null)
            {
                MSManufacturerWindow.SetItemToAssemble(WorldScript.mLocalPlayer, port, null);
                this.manager.RedrawWindow();
            }
            return(true);
        }
        else if (name.Contains("podicon"))
        {
            int slotNum = -1;
            int.TryParse(name.Replace("podicon", ""), out slotNum); //Get slot name as number
            if (slotNum > -1)
            {
                MSManufacturerWindow.SetItemToAssemble(WorldScript.mLocalPlayer, port, ItemManager.SpawnItem(350 + slotNum));
                GenericMachinePanelScript.instance.Hide();
            }
        }
        return(false);
    }
    public static NetworkInterfaceResponse HandleNetworkCommand(Player player, NetworkInterfaceCommand nic)
    {
        MSManufacturer port = nic.target as MSManufacturer;
        string         key  = nic.command;

        if (key != null)
        {
            if (key == InterfaceSetItemToAssemble)
            {
                MSManufacturerWindow.SetItemToAssemble(player, port, nic.itemContext);
            }
        }
        return(new NetworkInterfaceResponse()
        {
            entity = (SegmentEntity)port,
            inventory = player.mInventory
        });
    }