@etothepii/satisfactory-file-parser 0.1.29 → 0.1.30

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.
@@ -25,7 +25,7 @@ class BlueprintReader extends byte_reader_class_1.ByteReader {
25
25
  static ReadHeader(reader) {
26
26
  const blueprintTypeOrWhat = reader.readBytes(4);
27
27
  const versionThing = reader.readBytes(2 * 4);
28
- const dimensions = (0, util_types_1.ParseVec3f)(reader);
28
+ const dimensions = (0, util_types_1.ParseVec3Int)(reader);
29
29
  let itemTypeCount = reader.readInt32();
30
30
  const itemCosts = new Array(itemTypeCount).fill(['', 0]);
31
31
  for (let i = 0; i < itemTypeCount; i++) {
@@ -27,6 +27,8 @@ export type vec3 = vec2 & {
27
27
  };
28
28
  export declare const ParseVec3: (reader: BinaryReadable) => vec3;
29
29
  export declare const SerializeVec3: (writer: ByteWriter, vec: vec3) => void;
30
+ export declare const ParseVec3Int: (reader: BinaryReadable) => vec3;
31
+ export declare const SerializeVec3Int: (writer: ByteWriter, vec: vec3) => void;
30
32
  export declare const ParseVec3f: (reader: BinaryReadable) => vec3;
31
33
  export declare const SerializeVec3f: (writer: ByteWriter, vec: vec3) => void;
32
34
  export type vec2 = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SerializeTransform = exports.ParseTransform = exports.SerializeVec2f = exports.ParseVec2f = exports.SerializeVec2 = exports.ParseVec2 = exports.SerializeVec3f = exports.ParseVec3f = exports.SerializeVec3 = exports.ParseVec3 = exports.norm = exports.mult = exports.length = exports.add = exports.sub = exports.SerializeVec4f = exports.ParseVec4f = exports.SerializeVec4 = exports.ParseVec4 = exports.ParseCol4BGRA = exports.SerializeCol4BGRA = exports.ParseCol4RGBA = exports.SerializeCol4RGBA = void 0;
3
+ exports.SerializeTransform = exports.ParseTransform = exports.SerializeVec2f = exports.ParseVec2f = exports.SerializeVec2 = exports.ParseVec2 = exports.SerializeVec3f = exports.ParseVec3f = exports.SerializeVec3Int = exports.ParseVec3Int = exports.SerializeVec3 = exports.ParseVec3 = exports.norm = exports.mult = exports.length = exports.add = exports.sub = exports.SerializeVec4f = exports.ParseVec4f = exports.SerializeVec4 = exports.ParseVec4 = exports.ParseCol4BGRA = exports.SerializeCol4BGRA = exports.ParseCol4RGBA = exports.SerializeCol4RGBA = void 0;
4
4
  const SerializeCol4RGBA = (writer, value) => {
5
5
  writer.writeFloat(value.r);
6
6
  writer.writeFloat(value.g);
@@ -79,6 +79,20 @@ const SerializeVec3 = (writer, vec) => {
79
79
  writer.writeDouble(vec.z);
80
80
  };
81
81
  exports.SerializeVec3 = SerializeVec3;
82
+ const ParseVec3Int = (reader) => {
83
+ return {
84
+ x: reader.readInt32(),
85
+ y: reader.readInt32(),
86
+ z: reader.readInt32()
87
+ };
88
+ };
89
+ exports.ParseVec3Int = ParseVec3Int;
90
+ const SerializeVec3Int = (writer, vec) => {
91
+ writer.writeInt32(vec.x);
92
+ writer.writeInt32(vec.y);
93
+ writer.writeInt32(vec.z);
94
+ };
95
+ exports.SerializeVec3Int = SerializeVec3Int;
82
96
  const ParseVec3f = (reader) => {
83
97
  return {
84
98
  ...((0, exports.ParseVec2f)(reader)),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@etothepii/satisfactory-file-parser",
3
3
  "author": "etothepii",
4
- "version": "0.1.29",
4
+ "version": "0.1.30",
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",