Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@etothepii/satisfactory-file-parser

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@etothepii/satisfactory-file-parser - npm Package Compare versions

Comparing version 0.1.19 to 0.1.21

8

build/parser/satisfactory/blueprint/blueprint-reader.js

@@ -106,8 +106,8 @@ "use strict";

level_class_1.Level.ReadObjectHeaders(reader, objects, () => { });
const suomeChecksumThing = reader.readInt32();
BlueprintReader.ReadBlueprintObjectContents('', reader, objects, 0);
const someChecksumThing = reader.readInt32();
BlueprintReader.ReadBlueprintObjectContents(reader, objects, 0);
const pos = reader.getBufferPosition();
return objects;
}
static ReadBlueprintObjectContents(levelName, reader, objectsList, buildVersion) {
static ReadBlueprintObjectContents(reader, objectsList, buildVersion) {
const countEntities = reader.readInt32();

@@ -117,3 +117,3 @@ for (let i = 0; i < countEntities; i++) {

if (len === 0) {
throw new parser_error_1.CorruptSaveError(`check number is a wrong value (${len}). This normally indicates a corrupt entity or save.`);
throw new parser_error_1.CorruptSaveError(`check number is a wrong value (${len}). This normally indicates a corrupt entity or blueprint.`);
}

@@ -120,0 +120,0 @@ const obj = objectsList[i];

@@ -11,2 +11,3 @@ import { ByteWriter } from "../../byte/byte-writer.class";

static SerializeObjects(writer: ByteWriter, objects: (SaveEntity | SaveComponent)[]): void;
static SerializeObjectContents(writer: ByteWriter, objects: (SaveEntity | SaveComponent)[], buildVersion: number, levelName: string): void;
}

@@ -13,0 +14,0 @@ export declare class BlueprintConfigWriter extends ByteWriter {

@@ -7,2 +7,4 @@ "use strict";

const parser_error_1 = require("../../error/parser.error");
const SaveComponent_1 = require("../objects/SaveComponent");
const SaveEntity_1 = require("../objects/SaveEntity");
const level_class_1 = require("../save/level.class");

@@ -18,6 +20,11 @@ const save_writer_1 = require("../save/save-writer");

writer.writeInt32(42);
writer.writeInt32(249836);
writer.writeInt32(4);
writer.writeInt32(4);
writer.writeInt32(4);
writer.writeInt32(263910);
let dimensions = [
header.designerDimension?.x ?? 4,
header.designerDimension?.y ?? 4,
header.designerDimension?.z ?? 4,
].map(dim => dim < 4 ? 4 : dim);
writer.writeInt32(dimensions[0]);
writer.writeInt32(dimensions[1]);
writer.writeInt32(dimensions[2]);
writer.writeInt32(header.itemCosts.length);

@@ -50,4 +57,21 @@ for (const itemCost of header.itemCosts) {

writer.writeBinarySizeFromPosition(headersLenIndicator, headersLenIndicator + 4);
level_class_1.Level.SerializeObjectContents(writer, objects, 0, '');
BlueprintWriter.SerializeObjectContents(writer, objects, 0, '');
}
static SerializeObjectContents(writer, objects, buildVersion, levelName) {
const lenIndicatorEntities = writer.getBufferPosition();
writer.writeInt32(0);
writer.writeInt32(objects.length);
for (const obj of objects) {
const lenReplacementPosition = writer.getBufferPosition();
writer.writeInt32(0);
if ((0, SaveEntity_1.isSaveEntity)(obj)) {
SaveEntity_1.SaveEntity.SerializeData(writer, obj, buildVersion);
}
else if ((0, SaveComponent_1.isSaveComponent)(obj)) {
SaveComponent_1.SaveComponent.SerializeData(writer, obj, buildVersion);
}
writer.writeBinarySizeFromPosition(lenReplacementPosition, lenReplacementPosition + 4);
}
writer.writeBinarySizeFromPosition(lenIndicatorEntities, lenIndicatorEntities + 4);
}
}

@@ -54,0 +78,0 @@ exports.BlueprintWriter = BlueprintWriter;

@@ -75,3 +75,3 @@ "use strict";

const miniView = new DataView(saveBody.buffer);
miniView.setInt32(0, totalUncompressedSize - 4, alignment === alignment_enum_1.Alignment.LITTLE_ENDIAN);
miniView.setInt32(0, totalUncompressedSize, alignment === alignment_enum_1.Alignment.LITTLE_ENDIAN);
onBinaryBeforeCompressing(saveBody.buffer);

@@ -78,0 +78,0 @@ let handledByte = 0;

{
"name": "@etothepii/satisfactory-file-parser",
"author": "etothepii",
"version": "0.1.19",
"version": "0.1.21",
"description": "A file parser for satisfactory files. Includes save files and blueprint files.",

@@ -6,0 +6,0 @@ "types": "./build/index.d.ts",

@@ -20,3 +20,3 @@ # Satisfactory File Parser

| U6 + U7 | ✅ 0.0.1 - 0.0.34 |
| U8 | ✅ >= 0.1.19 |
| U8 | ✅ >= 0.1.20 |

@@ -23,0 +23,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc