@etothepii/satisfactory-file-parser 0.4.21 → 0.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -141,6 +141,10 @@ So far this was just a private hobby project. But i figure some people actually
141
141
  If you find a bug or have feedback about the parser, you can just open an issue on the github repo or hit me up on the satisfactory discord `etothepii`.
142
142
 
143
143
  # Changelog
144
+ ### [0.4.22] (2024-10-07)
145
+ #### compatibility fix
146
+ * referenced icon libraries in blueprints are now optional when being parsed.
147
+
144
148
  ### [0.4.21] (2024-10-07)
145
149
  #### internal package restructuring
146
150
  * restructured some internal packages.
@@ -138,15 +138,16 @@ class BlueprintConfigReader extends byte_reader_class_1.ByteReader {
138
138
  const description = reader.readString();
139
139
  const iconID = reader.readInt32();
140
140
  const color = col4_1.col4.ParseRGBA(reader);
141
- const referencedIconLibrary = reader.readString();
142
- const iconLibraryType = reader.readString();
143
- return {
141
+ const config = {
144
142
  description,
145
143
  color,
146
144
  iconID,
147
- referencedIconLibrary,
148
- iconLibraryType
149
145
  };
146
+ if (reader.getBufferPosition() < reader.getBufferLength()) {
147
+ config.referencedIconLibrary = reader.readString();
148
+ config.iconLibraryType = reader.readString();
149
+ }
150
+ return config;
150
151
  }
151
152
  }
152
153
  exports.BlueprintConfigReader = BlueprintConfigReader;
@@ -82,8 +82,8 @@ class BlueprintConfigWriter extends byte_writer_class_1.ByteWriter {
82
82
  writer.writeString(config.description);
83
83
  writer.writeInt32(config.iconID);
84
84
  col4_1.col4.SerializeRGBA(writer, config.color);
85
- writer.writeString(config.referencedIconLibrary);
86
- writer.writeString(config.iconLibraryType);
85
+ writer.writeString(config.referencedIconLibrary ?? '');
86
+ writer.writeString(config.iconLibraryType ?? '');
87
87
  }
88
88
  }
89
89
  exports.BlueprintConfigWriter = BlueprintConfigWriter;
@@ -7,8 +7,8 @@ export interface BlueprintConfig {
7
7
  description: string;
8
8
  color: col4;
9
9
  iconID: number;
10
- referencedIconLibrary: string;
11
- iconLibraryType: string;
10
+ referencedIconLibrary?: string;
11
+ iconLibraryType?: string;
12
12
  }
13
13
  export type BlueprintHeader = {
14
14
  designerDimension?: vec3;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@etothepii/satisfactory-file-parser",
3
3
  "author": "etothepii",
4
- "version": "0.4.21",
4
+ "version": "0.4.22",
5
5
  "description": "A file parser for satisfactory files. Includes save files and blueprint files.",
6
6
  "types": "./build/index.d.ts",
7
7
  "main": "./build/index.js",