Fix missing assembly machine type
This commit is contained in:
parent
48a648716d
commit
f4a6173a9f
3 changed files with 23 additions and 13 deletions
|
|
@ -2,12 +2,14 @@ use clap::Parser;
|
|||
use factorio_blueprint::{BlueprintString, encode};
|
||||
use factorio_blueprint_generator::assembly::assembly_line_2_input;
|
||||
use factorio_core::beltoptions::Beltspeed;
|
||||
use factorio_core::visualize::Visualize;
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Args {
|
||||
#[arg(short, long)]
|
||||
json: bool,
|
||||
assembly_machines: usize,
|
||||
machine: String,
|
||||
recipe: String,
|
||||
output_belt: Beltspeed,
|
||||
input_belt: Vec<Beltspeed>,
|
||||
|
|
@ -15,17 +17,19 @@ struct Args {
|
|||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
let b = BlueprintString::Blueprint(
|
||||
assembly_line_2_input(
|
||||
args.assembly_machines,
|
||||
args.recipe,
|
||||
args.input_belt[0],
|
||||
args.input_belt.get(1).copied(),
|
||||
args.output_belt,
|
||||
)
|
||||
.0
|
||||
.to_blueprint(),
|
||||
);
|
||||
let b = assembly_line_2_input(
|
||||
args.assembly_machines,
|
||||
args.machine,
|
||||
args.recipe,
|
||||
args.input_belt[0],
|
||||
args.input_belt.get(1).copied(),
|
||||
args.output_belt,
|
||||
)
|
||||
.0;
|
||||
|
||||
b.print_visualization();
|
||||
|
||||
let b = BlueprintString::Blueprint(b.to_blueprint());
|
||||
|
||||
if args.json {
|
||||
println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use clap::{Parser, ValueEnum};
|
||||
use clap::Parser;
|
||||
use factorio_blueprint::{BlueprintString, encode};
|
||||
use factorio_blueprint_generator::multistation::{StationSpec, multistation};
|
||||
use factorio_core::beltoptions::Beltspeed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue