Add output signals
This commit is contained in:
parent
ce76626f79
commit
aabd9486e0
3 changed files with 90 additions and 32 deletions
|
|
@ -202,10 +202,9 @@ pub fn multistation(stations: &[StationSpec], stacker_size: usize) -> Blueprint
|
|||
9,
|
||||
));
|
||||
|
||||
for j in 0..dbg!(
|
||||
(7 * longest_train).div_ceil(2)
|
||||
- (7 * (station.locomotives + station.wagons)).div_ceil(2)
|
||||
) {
|
||||
for j in 0..((7 * longest_train).div_ceil(2)
|
||||
- (7 * (station.locomotives + station.wagons)).div_ceil(2))
|
||||
{
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
RailType::Straight,
|
||||
Position::new(
|
||||
|
|
@ -225,7 +224,7 @@ pub fn multistation(stations: &[StationSpec], stacker_size: usize) -> Blueprint
|
|||
factorio_core::beltoptions::Belttype::Full,
|
||||
);
|
||||
|
||||
let station_height = PositionType::max(16, 16);
|
||||
let station_height = PositionType::max(12, 4 + ((3 - b.bounding_box().min().y) / 4) * 4);
|
||||
assert!(station_height % 4 == 0);
|
||||
|
||||
b.transform(Transformation::new(
|
||||
|
|
@ -301,6 +300,16 @@ pub fn multistation(stations: &[StationSpec], stacker_size: usize) -> Blueprint
|
|||
),
|
||||
6,
|
||||
));
|
||||
if i % 4 == 0 {
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
RailType::RailSignal,
|
||||
Position::new(
|
||||
outrail_x - 7 - 4 * i as PositionType,
|
||||
total_stacker_height - 19 - 4 * i as PositionType,
|
||||
),
|
||||
6,
|
||||
));
|
||||
}
|
||||
}
|
||||
let remaining_offset = total_stacker_height - 34 - out_diagonal_length * 4;
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
|
|
@ -313,12 +322,24 @@ pub fn multistation(stations: &[StationSpec], stacker_size: usize) -> Blueprint
|
|||
Position::new(38, remaining_offset + 4),
|
||||
8,
|
||||
));
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
RailType::RailSignal,
|
||||
Position::new(41, remaining_offset + 7),
|
||||
7,
|
||||
));
|
||||
for i in 0..(remaining_offset / 4) {
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
RailType::Straight,
|
||||
Position::new(38, 2 + 4 * i as PositionType),
|
||||
0,
|
||||
));
|
||||
if i % 8 == 7 {
|
||||
blueprint.add_entity(Entity::new_rail(
|
||||
RailType::RailSignal,
|
||||
Position::new(41, 3 + 4 * i as PositionType),
|
||||
8,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
blueprint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue