private void OnReceiverDisconnected(EntityUid uid, ApcPowerProviderComponent provider, ExtensionCableSystem.ReceiverDisconnectedEvent args) { if (EntityManager.TryGetComponent(args.Receiver.Owner, out ApcPowerReceiverComponent receiver)) { provider.RemoveReceiver(receiver); } }
private void OnProviderShutdown(EntityUid uid, ApcPowerProviderComponent component, ComponentShutdown args) { foreach (var receiver in component.LinkedReceivers) { receiver.NetworkLoad.LinkedNetwork = default; component.Net?.QueueNetworkReconnect(); } component.LinkedReceivers.Clear(); }