public List <IntrinsicElectronicData> GetElectricalConnections(Vector3Int position) { var list = ElectricalPool.GetFPCList(); if (ServerObjects != null) { var collection = ServerObjects.Get(position); for (int i = collection.Count - 1; i >= 0; i--) { if (i < collection.Count && collection[i] != null && collection[i].ElectricalData != null && collection[i].ElectricalData.InData != null) { list.Add(collection[i].ElectricalData.InData); } } } if (metaDataLayer.Get(position)?.ElectricalData != null) { foreach (var electricalMetaData in metaDataLayer.Get(position).ElectricalData) { list.Add(electricalMetaData.InData); } } return(list); }
public List <PipeData> GetPipeConnections(Vector3Int position) { var list = new List <PipeData>(); var collection = ServerObjects.Get(position); //Logger.Log(collection.Count.ToString()); foreach (var t in collection) { if (t.PipeData != null) { list.Add(t.PipeData); } } var pipes = metaDataLayer.Get(position).PipeData; foreach (var PipeNode in pipes) { list.Add(PipeNode.pipeData); } return(list); }
public IEnumerable <ElectricalOIinheritance> GetElectricalConnections(Vector3Int position) { if (ServerObjects != null) { return(ServerObjects.Get(position).Select(x => x.GetComponent <ElectricalOIinheritance>()).Where(x => x != null)); } else { return(null); } }
public List <IntrinsicElectronicData> GetElectricalConnections(Vector3Int position) { var list = ElectricalPool.GetFPCList(); if (ServerObjects != null) { foreach (var Object in ServerObjects.Get(position)) { if (Object?.ElectricalData?.InData != null) { list.Add(Object?.ElectricalData?.InData); } } } if (metaDataLayer.Get(position)?.ElectricalData != null) { foreach (var electricalMetaData in metaDataLayer.Get(position).ElectricalData) { list.Add(electricalMetaData.InData); } } return(list); }