Exemple #1
0
    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);
    }
Exemple #2
0
    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);
    }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
    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);
    }