Add furnaces to blueprint graph
This commit is contained in:
parent
618d9ca9de
commit
8e4e83e7ff
8 changed files with 81 additions and 49 deletions
|
|
@ -2,23 +2,23 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: military-science-pack
|
recipe: military-science-pack
|
||||||
machines: 40
|
machines: 40
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: piercing-rounds-magazine
|
recipe: piercing-rounds-magazine
|
||||||
machines: 12
|
machines: 12
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: firearm-magazine
|
recipe: firearm-magazine
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: grenade
|
recipe: grenade
|
||||||
machines: 32
|
machines: 32
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: stone-wall
|
recipe: stone-wall
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
factory_connections:
|
factory_connections:
|
||||||
- item: military-science-pack
|
- item: military-science-pack
|
||||||
|
|
|
||||||
|
|
@ -2,43 +2,43 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: chemical-science-pack
|
recipe: chemical-science-pack
|
||||||
machines: 96
|
machines: 96
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: engine-unit
|
recipe: engine-unit
|
||||||
machines: 80
|
machines: 80
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: iron-gear-wheel
|
recipe: iron-gear-wheel
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: pipe
|
recipe: pipe
|
||||||
machines: 8
|
machines: 8
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: advanced-circuit
|
recipe: advanced-circuit
|
||||||
machines: 72
|
machines: 72
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
- !Splitter
|
- !Splitter
|
||||||
- !Splitter
|
- !Splitter
|
||||||
|
|
|
||||||
|
|
@ -2,46 +2,56 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: chemical-science-pack
|
recipe: chemical-science-pack
|
||||||
machines: 96
|
machines: 96
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: engine-unit
|
recipe: engine-unit
|
||||||
machines: 80
|
machines: 80
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: iron-gear-wheel
|
recipe: iron-gear-wheel
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: pipe
|
recipe: pipe
|
||||||
machines: 8
|
machines: 8
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: advanced-circuit
|
recipe: advanced-circuit
|
||||||
machines: 72
|
machines: 72
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 10
|
machines: 10
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
- !Distributor
|
- !Distributor
|
||||||
- !Distributor
|
- !Distributor
|
||||||
|
- !Distributor
|
||||||
|
- !SubFactory
|
||||||
|
recipe: copper-plate
|
||||||
|
machines: 64
|
||||||
|
machine: electric-furnace
|
||||||
|
- !Distributor
|
||||||
|
- !SubFactory
|
||||||
|
recipe: copper-plate
|
||||||
|
machines: 48
|
||||||
|
machine: electric-furnace
|
||||||
factory_connections:
|
factory_connections:
|
||||||
- item: chemical-science-pack
|
- item: chemical-science-pack
|
||||||
amount: 10
|
amount: 10
|
||||||
|
|
@ -73,12 +83,20 @@ factory_connections:
|
||||||
to: 1
|
to: 1
|
||||||
- item: iron-plate
|
- item: iron-plate
|
||||||
amount: 20
|
amount: 20
|
||||||
from: 10
|
from: 13
|
||||||
to: 2
|
to: 2
|
||||||
- item: iron-plate
|
- item: iron-plate
|
||||||
amount: 20
|
amount: 20
|
||||||
from: 10
|
from: 13
|
||||||
to: 3
|
to: 3
|
||||||
|
- item: iron-ore
|
||||||
|
amount: 40
|
||||||
|
from: 10
|
||||||
|
to: 14
|
||||||
|
- item: iron-plate
|
||||||
|
amount: 40
|
||||||
|
from: 14
|
||||||
|
to: 13
|
||||||
- item: electronic-circuit
|
- item: electronic-circuit
|
||||||
amount: 30
|
amount: 30
|
||||||
from: 12
|
from: 12
|
||||||
|
|
@ -97,12 +115,20 @@ factory_connections:
|
||||||
to: 4
|
to: 4
|
||||||
- item: iron-plate
|
- item: iron-plate
|
||||||
amount: 15
|
amount: 15
|
||||||
from: 10
|
from: 15
|
||||||
to: 5
|
to: 5
|
||||||
- item: iron-plate
|
- item: iron-plate
|
||||||
amount: 15
|
amount: 15
|
||||||
from: 10
|
from: 15
|
||||||
to: 6
|
to: 6
|
||||||
|
- item: iron-plate
|
||||||
|
amount: 30
|
||||||
|
from: 16
|
||||||
|
to: 15
|
||||||
|
- item: iron-ore
|
||||||
|
amount: 30
|
||||||
|
from: 10
|
||||||
|
to: 16
|
||||||
- item: copper-plate
|
- item: copper-plate
|
||||||
amount: 25
|
amount: 25
|
||||||
from: 10
|
from: 10
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,24 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: iron-gear-wheel
|
recipe: iron-gear-wheel
|
||||||
machines: 2
|
machines: 2
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 9
|
machines: 9
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !Splitter
|
- !Splitter
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: inserter
|
recipe: inserter
|
||||||
machines: 2
|
machines: 2
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: fast-inserter
|
recipe: fast-inserter
|
||||||
machines: 2
|
machines: 2
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SideLoader
|
- !SideLoader
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
- !SideLoader
|
- !SideLoader
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,27 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: logistic-science-pack
|
recipe: logistic-science-pack
|
||||||
machines: 48
|
machines: 48
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: inserter
|
recipe: inserter
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 4
|
machines: 4
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: transport-belt
|
recipe: transport-belt
|
||||||
machines: 2
|
machines: 2
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: iron-gear-wheel
|
recipe: iron-gear-wheel
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
- !Splitter
|
- !Splitter
|
||||||
factory_connections:
|
factory_connections:
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,19 @@ subfactories:
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: iron-gear-wheel
|
recipe: iron-gear-wheel
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: copper-cable
|
recipe: copper-cable
|
||||||
machines: 9
|
machines: 9
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: electronic-circuit
|
recipe: electronic-circuit
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !SubFactory
|
- !SubFactory
|
||||||
recipe: inserter
|
recipe: inserter
|
||||||
machines: 6
|
machines: 6
|
||||||
machine: assembly-machine-3
|
machine: assembling-machine-3
|
||||||
- !ExternalConnection
|
- !ExternalConnection
|
||||||
factory_connections:
|
factory_connections:
|
||||||
- item: iron-gear-wheel
|
- item: iron-gear-wheel
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
use factorio_blueprint::abstraction::{Blueprint, ElectricPoleType, Entity, InserterType};
|
use factorio_blueprint::abstraction::{Blueprint, ElectricPoleType, Entity, InserterType};
|
||||||
use factorio_core::{beltoptions::Beltspeed, prelude::*};
|
use factorio_core::{beltoptions::Beltspeed, prelude::*};
|
||||||
|
|
||||||
pub fn assembly_line(assembly_machines: usize, recipe: impl AsRef<str>) -> Blueprint {
|
pub fn assembly_line(
|
||||||
|
assembly_machines: usize,
|
||||||
|
machine: impl AsRef<str>,
|
||||||
|
recipe: impl AsRef<str>,
|
||||||
|
) -> Blueprint {
|
||||||
let mut blueprint = Blueprint::new();
|
let mut blueprint = Blueprint::new();
|
||||||
let mut last = None;
|
let mut last = None;
|
||||||
for i in 0..assembly_machines.div_ceil(3) {
|
for i in 0..assembly_machines.div_ceil(3) {
|
||||||
|
|
@ -26,7 +30,7 @@ pub fn assembly_line(assembly_machines: usize, recipe: impl AsRef<str>) -> Bluep
|
||||||
|
|
||||||
for i in 0..assembly_machines {
|
for i in 0..assembly_machines {
|
||||||
blueprint.add_entity(Entity::new_production(
|
blueprint.add_entity(Entity::new_production(
|
||||||
"assembling-machine-3",
|
&machine,
|
||||||
recipe.as_ref(),
|
recipe.as_ref(),
|
||||||
Position::new(3 + 6 * i as PositionType, 9),
|
Position::new(3 + 6 * i as PositionType, 9),
|
||||||
Direction::Up,
|
Direction::Up,
|
||||||
|
|
@ -217,6 +221,7 @@ pub fn assembly_line(assembly_machines: usize, recipe: impl AsRef<str>) -> Bluep
|
||||||
|
|
||||||
pub fn assembly_line_2_input(
|
pub fn assembly_line_2_input(
|
||||||
assembly_machines: usize,
|
assembly_machines: usize,
|
||||||
|
machine: impl AsRef<str>,
|
||||||
recipe: impl AsRef<str>,
|
recipe: impl AsRef<str>,
|
||||||
input_belt1: Beltspeed,
|
input_belt1: Beltspeed,
|
||||||
input_belt2: Option<Beltspeed>,
|
input_belt2: Option<Beltspeed>,
|
||||||
|
|
@ -260,14 +265,14 @@ pub fn assembly_line_2_input(
|
||||||
|
|
||||||
for i in 0..halve_machines {
|
for i in 0..halve_machines {
|
||||||
blueprint.add_entity(Entity::new_production(
|
blueprint.add_entity(Entity::new_production(
|
||||||
"assembling-machine-3",
|
&machine,
|
||||||
recipe.as_ref(),
|
recipe.as_ref(),
|
||||||
Position::new(3 + 6 * i as PositionType, 9),
|
Position::new(3 + 6 * i as PositionType, 9),
|
||||||
Direction::Up,
|
Direction::Up,
|
||||||
Position::new(6, 6),
|
Position::new(6, 6),
|
||||||
));
|
));
|
||||||
blueprint.add_entity(Entity::new_production(
|
blueprint.add_entity(Entity::new_production(
|
||||||
"assembling-machine-3",
|
&machine,
|
||||||
recipe.as_ref(),
|
recipe.as_ref(),
|
||||||
Position::new(3 + 6 * i as PositionType, 21),
|
Position::new(3 + 6 * i as PositionType, 21),
|
||||||
Direction::Up,
|
Direction::Up,
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ pub fn generate_factory<L: Layouter, P: Pathfinder + Sync, R: Rng + SeedableRng
|
||||||
machines,
|
machines,
|
||||||
machine,
|
machine,
|
||||||
} => {
|
} => {
|
||||||
assert_eq!(machine, "assembly-machine-3");
|
// assert_eq!(machine, "assembly-machine-3");
|
||||||
assert_eq!(output_connections.len(), 1);
|
assert_eq!(output_connections.len(), 1);
|
||||||
assert!(input_connections.len() <= 3);
|
assert!(input_connections.len() <= 3);
|
||||||
let output_connection = output_connections.first().unwrap();
|
let output_connection = output_connections.first().unwrap();
|
||||||
|
|
@ -224,6 +224,7 @@ pub fn generate_factory<L: Layouter, P: Pathfinder + Sync, R: Rng + SeedableRng
|
||||||
|
|
||||||
let (b, size, y_output, y_inputs) = assembly_line_2_input(
|
let (b, size, y_output, y_inputs) = assembly_line_2_input(
|
||||||
*machines,
|
*machines,
|
||||||
|
machine,
|
||||||
recipe,
|
recipe,
|
||||||
input_belt1,
|
input_belt1,
|
||||||
input_belt2,
|
input_belt2,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue