Use StationSpec for basic station

This commit is contained in:
hal8174 2025-05-03 15:18:10 +02:00
parent 7f563b37a4
commit a98e2cfb2b
4 changed files with 63 additions and 60 deletions

View file

@ -1,6 +1,9 @@
use clap::{Parser, Subcommand};
use factorio_blueprint::{BlueprintBook, BlueprintBookEntry, BlueprintString, encode};
use factorio_blueprint_generator::station::{StationBasicSpec, basic_station};
use factorio_blueprint_generator::{
multistation::StationSpec,
station::{StationBasicSpec, basic_station},
};
use factorio_core::beltoptions::{Beltspeed, Belttype};
#[derive(Parser)]
@ -63,13 +66,15 @@ fn main() {
let o = 1 << o;
let blueprint = basic_station(
load,
locomotives,
cargo,
o,
beltspeed,
Belttype::Full,
false,
&StationSpec {
locomotives,
wagons: cargo,
load,
beltspeed,
lanes: o,
belttype: Belttype::Full,
stacked: false,
},
&factorio_blueprint_generator::station::StationBasicSpec::default(),
);
@ -132,13 +137,15 @@ fn main() {
} => {
let b = BlueprintString::Blueprint(
basic_station(
load,
locomotives,
length,
outputs,
beltspeed,
belttype,
false,
&StationSpec {
locomotives,
wagons: length,
load,
beltspeed,
lanes: outputs,
belttype,
stacked: false,
},
&StationBasicSpec::default(),
)
.to_blueprint(),