Skip to content

Commit

Permalink
Update factorio_structs.rs
Browse files Browse the repository at this point in the history
- add descriptions for each blueprint
  • Loading branch information
facesthe committed Jul 25, 2022
1 parent 268854e commit c84b2c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/factorio_structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
pub item: Option<String>,
pub label: String,
pub label_color: Option<Color>,
Expand All @@ -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<String>,
pub item: Option<String>,
pub label: String,
pub label_color: Option<Color>,
Expand Down Expand Up @@ -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<String>,
pub item: Option<String>,
pub label: String,
pub label_color: Option<Color>,
Expand All @@ -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<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub item: Option<String>,
pub label: String,
Expand All @@ -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<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub item: Option<String>,
pub label: String,
Expand Down

0 comments on commit c84b2c0

Please sign in to comment.