Exemplo n.º 1
0
 protected ConsumerNode(Item item, ProductionGraph graph)
     : base(graph)
 {
     ConsumedItem = item;
     rateType     = RateType.Manual;
     actualRate   = 1f;
 }
Exemplo n.º 2
0
        public static RecipeNode Create(Recipe baseRecipe, ProductionGraph graph)
        {
            RecipeNode node = new RecipeNode(baseRecipe, graph);

            node.Graph.Nodes.Add(node);
            node.Graph.InvalidateCaches();
            return(node);
        }
Exemplo n.º 3
0
        public static PassthroughNode Create(Item item, ProductionGraph graph)
        {
            PassthroughNode node = new PassthroughNode(item, graph);

            node.Graph.Nodes.Add(node);
            node.Graph.InvalidateCaches();
            return(node);
        }
Exemplo n.º 4
0
        public static ConsumerNode Create(Item item, ProductionGraph graph)
        {
            ConsumerNode node = new ConsumerNode(item, graph);

            node.Graph.Nodes.Add(node);
            node.Graph.InvalidateCaches();
            return(node);
        }
Exemplo n.º 5
0
        public static void FindOptimalGraphToSatisfyFixedNodes(
            this ProductionGraph graph, IReadOnlyCollection <ProductionNode> nodeGroup)
        {
            foreach (ProductionNode node in nodeGroup.Where(n => n.RateType == RateType.Auto))
            {
                node.ResetSolvedRate();
            }

            OptimiseNodeGroup(nodeGroup);

            graph.UpdateLinkThroughputs();
        }
Exemplo n.º 6
0
        public static void FindOptimalGraphToSatisfyFixedNodes(this ProductionGraph graph)
        {
            foreach (ProductionNode node in graph.Nodes.Where(n => n.RateType == RateType.Auto))
            {
                node.ResetSolvedRate();
            }

            foreach (var nodeGroup in graph.GetConnectedComponents())
            {
                OptimiseNodeGroup(nodeGroup);
            }

            graph.UpdateLinkThroughputs();
        }
Exemplo n.º 7
0
 protected SupplyNode(Item item, ProductionGraph graph)
     : base(graph)
 {
     SuppliedItem = item;
 }
Exemplo n.º 8
0
 protected ProductionNode(ProductionGraph graph)
 {
     Graph = graph;
 }
Exemplo n.º 9
0
 protected RecipeNode(Recipe baseRecipe, ProductionGraph graph)
     : base(graph)
 {
     BaseRecipe = baseRecipe;
 }
Exemplo n.º 10
0
		public static ConsumerNode Create(Item item, ProductionGraph graph)
		{
			ConsumerNode node = new ConsumerNode(item, graph);
			node.Graph.Nodes.Add(node);
			node.Graph.InvalidateCaches();
			return node;
		}
Exemplo n.º 11
0
		protected ConsumerNode(Item item, ProductionGraph graph) : base(graph)
		{
			ConsumedItem = item;
		}
Exemplo n.º 12
0
		protected ProductionNode(ProductionGraph graph)
		{
			Graph = graph;
		}
Exemplo n.º 13
0
		public static RecipeNode Create(Recipe baseRecipe, ProductionGraph graph)
		{
			RecipeNode node = new RecipeNode(baseRecipe, graph);
			node.Graph.Nodes.Add(node);
			node.Graph.InvalidateCaches();
			return node;
		}
Exemplo n.º 14
0
		protected RecipeNode(Recipe baseRecipe, ProductionGraph graph)
			: base(graph)
		{
			BaseRecipe = baseRecipe;
		}
Exemplo n.º 15
0
 protected PassthroughNode(Item item, ProductionGraph graph)
     : base(graph)
 {
     this.PassedItem = item;
 }
Exemplo n.º 16
0
 protected ConsumerNode(Item item, ProductionGraph graph) : base(graph)
 {
     ConsumedItem = item;
 }
Exemplo n.º 17
0
		protected SupplyNode(Item item, ProductionGraph graph)
			: base(graph)
		{
			SuppliedItem = item;
		}
Exemplo n.º 18
0
 protected RecipeNode(Recipe baseRecipe, ProductionGraph graph)
     : base(graph)
 {
     BaseRecipe  = baseRecipe;
     NodeModules = ModuleSelector.Fastest;
 }