Exemplo n.º 1
0
        public static void UpdateNodeEnabled(this Part part, AttachNode node)
        {
            bool shouldBeEnabled = true;

            foreach (ModuleB9PartSwitch module in part.Modules.OfType <ModuleB9PartSwitch>())
            {
                if (!module.NodeShouldBeEnabled(node))
                {
                    shouldBeEnabled = false;
                    break;
                }
            }

            if (shouldBeEnabled)
            {
                node.Unhide();
            }
            else
            {
                node.Hide();
            }
        }
Exemplo n.º 2
0
 private void Activate() => node.Unhide();