Fix quality serialization
This commit is contained in:
parent
06b01c2fe4
commit
65e2c03824
3 changed files with 15 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use clap::Parser;
|
||||
use factorio_blueprint::abstraction::serde::AbstractBlueprintString;
|
||||
use factorio_blueprint::{BlueprintString, encode};
|
||||
use factorio_blueprint_generator::multistation::{StationSpec, multistation};
|
||||
use factorio_core::beltoptions::Beltspeed;
|
||||
|
|
@ -67,7 +68,7 @@ fn main() {
|
|||
b.connect_power_networks();
|
||||
|
||||
b.print_visualization();
|
||||
let b = BlueprintString::Blueprint(b.to_blueprint());
|
||||
let b = AbstractBlueprintString { blueprint: &b };
|
||||
|
||||
if args.json {
|
||||
println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ pub fn unloader(beltspeed: Beltspeed, belttype: Belttype) -> (Blueprint, Positio
|
|||
let (belt_inserter, stack_size, quality) = match beltspeed {
|
||||
Beltspeed::Normal => unreachable!(),
|
||||
Beltspeed::Fast => (InserterType::Fast, None, Quality::Normal),
|
||||
Beltspeed::Express => (InserterType::Bulk, Some(8), Quality::Normal),
|
||||
Beltspeed::Turbo => (InserterType::Bulk, None, Quality::Epic),
|
||||
Beltspeed::Express => (InserterType::Bulk, Some(7), Quality::Normal),
|
||||
Beltspeed::Turbo => (InserterType::Bulk, Some(10), Quality::Normal),
|
||||
};
|
||||
|
||||
b.add_entity(Entity::new_belt(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue