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(); } }
private void Activate() => node.Unhide();