private void OnPortableAnchored(EntityUid uid, GasPortableComponent portable, AnchoredEvent args) { if (!EntityManager.TryGetComponent(uid, out NodeContainerComponent? nodeContainer)) { return; } if (!nodeContainer.TryGetNode(portable.PortName, out PipeNode? portableNode)) { return; } portableNode.ConnectionsEnabled = true; if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance)) { appearance.SetData(GasPortableVisuals.ConnectedState, true); } }
private static void OnAnchored(EntityUid uid, DisposalUnitComponent component, AnchoredEvent args) { component.UpdateVisualState(); }