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);
            }
        }
Ejemplo n.º 2
0
 private static void OnAnchored(EntityUid uid, DisposalUnitComponent component, AnchoredEvent args)
 {
     component.UpdateVisualState();
 }