public static List <IStorageNetworkNode> GetBasicStationDemand(VehicleStation station) { List <IStorageNetworkNode> targetNodes = new List <IStorageNetworkNode>(); List <IStorageNetworkNode> sourceNodes = new List <IStorageNetworkNode>(); station.GetConnectedNodes(targetNodes, sourceNodes); return(targetNodes); }
public static IEnumerable <IStorageNetworkNode> GetStationDemandNodes(VehicleStation station, bool additionalDemands = true, bool includeDisabled = false) { List <IStorageNetworkNode> targetNodes = new List <IStorageNetworkNode>(); List <IStorageNetworkNode> sourceNodes = new List <IStorageNetworkNode>(); station.GetConnectedNodes(targetNodes, sourceNodes); StorageNetworkManager manager = LazyManager <StorageNetworkManager> .Current; foreach (IStorageNetworkNode node in targetNodes) { if (includeDisabled || manager.GetIsEnabled(station, node) && (node is Store || node is Lab)) { yield return(node); } } if (additionalDemands) { foreach (IStorageNetworkNode node in LazyManager <StationDemandManager> .Current.GetAdditionalDemandsEnum(station)) { yield return(node); } } yield break; }