public void SellModule()
    {
        Game.credits += GetSellAmount();

        PlayerInput.cur.contextMenu.ExitMenu();
        AssemblyCircleMenu.Close();

        DestroyModule();
    }
    void OnMouseDownElement()
    {
        // The entire isUpgrading part of this isn't used anymore. Remove if it annoys you.
        if (PlayerInput.cur.isUpgrading && isRoot && Game.credits >= GetFullUpgradeCost())
        {
            UpgradeAssembly(0);
            UpgradeAssembly(1);
            UpgradeAssembly(2);

            UpdateHoverContextElement();
            GetComponent <HoverContextElement> ().ForceUpdate();
        }
        else if (!PlayerInput.cur.isUpgrading)
        {
            AssemblyCircleMenu.Open(Camera.main.WorldToScreenPoint(transform.position), this);
        }
    }
 void Awake()
 {
     cur = this;
     Close();
 }