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
89
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.4 to 0.1.6

2

build/parser/parser.js

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

onDecompressedSaveBody(reader.getBuffer());
reader.readGrids();
const grids = reader.readGrids();
save.levels = reader.readLevels();

@@ -28,0 +28,0 @@ save.compressionInfo = reader.compressionInfo;

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

const start = reader.getBufferPosition();
obj.properties = {};
obj.properties = [];
if (length === 0) {

@@ -19,3 +19,3 @@ return;

const property = DataFields.ParseProperty(reader, buildVersion, propertyName);
obj.properties[property.name] = property;
obj.properties.push(property);
propertyName = reader.readString();

@@ -22,0 +22,0 @@ }

@@ -14,5 +14,3 @@ import { BinaryReadable } from "../../byte/binary-readable.interface";

instanceName: string;
properties: {
[name: string]: AbstractBaseProperty;
};
properties: AbstractBaseProperty[];
specialProperties: SpecialAnyProperty;

@@ -19,0 +17,0 @@ trailingData: number[];

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

this.instanceName = instanceName;
this.properties = {};
this.properties = [];
this.specialProperties = {};

@@ -13,0 +13,0 @@ this.trailingData = [];

@@ -11,3 +11,6 @@ import { ByteReader } from "../../byte/byte-reader.class";

[parentName: string]: {
[level: number]: string[];
[level: number]: {
name: string;
size: number;
}[];
};

@@ -14,0 +17,0 @@ };

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

for (let i = 0; i < childrenCount; i++) {
const binaryLenIGuess = this.readInt32();
const binaryLenIGuess = this.readUint32();
const levelInstanceName = this.readString();

@@ -49,3 +49,6 @@ const lod = /\_L([0-9]+)\_/.exec(levelInstanceName)[1];

}
grids[parentName][Number(lod)].push(levelInstanceName);
grids[parentName][Number(lod)].push({
name: levelInstanceName,
size: binaryLenIGuess
});
}

@@ -52,0 +55,0 @@ };

@@ -5,2 +5,3 @@ import { Alignment } from "../../byte/alignment.enum";

import { SatisfactorySave } from "./satisfactory-save";
import { Grids } from "./save-reader";
import { SatisfactorySaveHeader } from "./save.types";

@@ -10,2 +11,3 @@ export declare class SaveWriter extends ByteWriter {

static WriteHeader(writer: ByteWriter, header: SatisfactorySaveHeader): void;
static WriteGrids: (writer: ByteWriter, grids: Grids) => void;
static WriteLevels(writer: ByteWriter, save: SatisfactorySave, buildVersion: number): void;

@@ -12,0 +14,0 @@ static GenerateCompressedChunksFromData(bufferArray: ArrayBuffer, compressionInfo: ChunkCompressionInfo, onBinaryBeforeCompressing: (binary: ArrayBuffer) => void, onChunk: (chunk: Uint8Array) => void, alignment?: Alignment): ChunkSummary[];

@@ -115,2 +115,21 @@ "use strict";

}
SaveWriter.WriteGrids = (writer, grids) => {
writer.writeInt32(0);
writer.writeInt32(0);
writer.writeString('None');
writer.writeInt32(0);
writer.writeInt32(0);
writer.writeInt32(0);
writer.writeString('None');
for (const parentEntry of Object.entries(grids)) {
writer.writeInt32(0);
writer.writeString(parentEntry[0]);
writer.writeInt32(0);
writer.writeInt32(0);
for (const child of Object.entries(parentEntry[1]).flatMap(entry => entry[1])) {
writer.writeUint32(child.size);
writer.writeString(child.name);
}
}
};
exports.SaveWriter = SaveWriter;
{
"name": "@etothepii/satisfactory-file-parser",
"author": "etothepii",
"version": "0.1.4",
"version": "0.1.6",
"description": "A file parser for satisfactory files. Includes save files and blueprint files.",

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

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

| U6 + U7 | ✅ 0.0.1 - 0.0.34 |
| U8 | ⚠️ >= 0.1.3 (Reading only) |
| U8 | ⚠️ >= 0.1.5 (Reading only) |

@@ -25,0 +25,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