Allow stationary interfaces for layouting
This commit is contained in:
parent
8c8cdcc802
commit
fda5361a2b
3 changed files with 40 additions and 24 deletions
|
|
@ -103,9 +103,9 @@ pub fn generate_factory<L: Layouter, P: Pathfinder + Sync, R: Rng + SeedableRng
|
|||
Beltspeed::from_items_per_second(2.0 * f64::max(c1.amount, c2.amount));
|
||||
|
||||
connections.push(Connection {
|
||||
startblock: block_index + 1,
|
||||
startblock: Some(block_index + 1),
|
||||
startpoint: 0,
|
||||
endblock: block_index,
|
||||
endblock: Some(block_index),
|
||||
endpoint: if c0_bigger { 0 } else { 1 },
|
||||
lanes: 1,
|
||||
beltspeed,
|
||||
|
|
@ -335,9 +335,9 @@ pub fn generate_factory<L: Layouter, P: Pathfinder + Sync, R: Rng + SeedableRng
|
|||
for (i, c) in factory_graph.factory_connections.iter().enumerate() {
|
||||
// dbg!(i, c);
|
||||
connections.push(Connection {
|
||||
startblock: intermediate_connections[c.from].1[&i].0,
|
||||
startblock: Some(intermediate_connections[c.from].1[&i].0),
|
||||
startpoint: intermediate_connections[c.from].1[&i].1,
|
||||
endblock: intermediate_connections[c.to].0[&i].0,
|
||||
endblock: Some(intermediate_connections[c.to].0[&i].0),
|
||||
endpoint: intermediate_connections[c.to].0[&i].1,
|
||||
lanes: 1,
|
||||
beltspeed: Beltspeed::from_items_per_second(c.amount),
|
||||
|
|
@ -348,6 +348,8 @@ pub fn generate_factory<L: Layouter, P: Pathfinder + Sync, R: Rng + SeedableRng
|
|||
// dbg!(&connections);
|
||||
|
||||
let layout_input = LayoutInput {
|
||||
input: Vec::new(),
|
||||
output: Vec::new(),
|
||||
blocks,
|
||||
connections,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue