diff --git a/src/factorio_structs.rs b/src/factorio_structs.rs index 534502d..be2f487 100644 --- a/src/factorio_structs.rs +++ b/src/factorio_structs.rs @@ -11,6 +11,8 @@ pub mod fragments { /// Blueprint parameters except arrays #[derive(Serialize, Deserialize, Debug)] pub struct BlueprintFragment { + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, pub item: Option, pub label: String, pub label_color: Option, @@ -20,6 +22,8 @@ pub mod fragments { /// Blueprint book #[derive(Serialize, Deserialize, Debug)] pub struct BookFragment { + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, pub item: Option, pub label: String, pub label_color: Option, @@ -69,6 +73,8 @@ pub mod exportable { /// Blueprint book with additional parameter containing the order of it's child blueprints #[derive(Serialize, Deserialize, Debug)] pub struct Book { // used internally + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, pub item: Option, pub label: String, pub label_color: Option, @@ -88,6 +94,8 @@ pub struct Book { // used internally #[derive(Serialize, Deserialize, Debug)] pub struct BookDotFile { //used internally + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, #[serde(skip_serializing_if = "Option::is_none")] pub item: Option, pub label: String, @@ -108,6 +116,8 @@ pub struct BookDotFile { //used internally #[derive(Serialize, Deserialize, Debug)] pub struct Blueprint { //used internally + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, #[serde(skip_serializing_if = "Option::is_none")] pub item: Option, pub label: String,