30 lines
642 B
Rust
30 lines
642 B
Rust
use clap::Parser;
|
|
use factorio_blueprint::blueprint::{
|
|
belt::Beltspeed, station::basic_unload_station, BlueprintString,
|
|
};
|
|
|
|
#[derive(Parser)]
|
|
struct Args {
|
|
locomotives: usize,
|
|
length: usize,
|
|
outputs: usize,
|
|
beltspeed: Beltspeed,
|
|
}
|
|
|
|
fn main() {
|
|
let args = Args::parse();
|
|
|
|
let b = BlueprintString::Blueprint(basic_unload_station(
|
|
args.locomotives,
|
|
args.length,
|
|
args.outputs,
|
|
args.beltspeed,
|
|
));
|
|
|
|
println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
|
|
|
println!(
|
|
"{}",
|
|
factorio_blueprint::blueprint::encode(&serde_json::to_string(&b).unwrap())
|
|
);
|
|
}
|