Socket
Socket
Sign inDemoInstall

satisfactory-json

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satisfactory-json - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

4

lib/json2sav.js

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

writeConveyorBeltExtra(entity) {
this.buffer.writeInt(entity.extra.items.count);
/*this.buffer.writeInt(entity.extra.items.count);
for (const item of entity.extra.items) {

@@ -492,3 +492,3 @@ this.buffer.writeInt(0);

this.buffer.writeFloat(item.position);
}
}*/
}

@@ -495,0 +495,0 @@ error(message) {

@@ -111,2 +111,3 @@ "use strict";

if (zero !== 0) {
console.log(this.readHex(32));
throw new Error('expected 0 int, but got ' + zero);

@@ -255,7 +256,7 @@ }

entity.missing = buffer.readHex(missing);
console.warn('missing data found in entity of type ' + className +
': ' + entity.missing);
/*console.warn('missing data found in entity of type ' + className +
': ' + entity.missing);*/
}
else if (missing < 0) {
this.error('negative missing amount: ' + missing);
this.error('negative missing amount in entity of type ' + className + ': ' + missing);
}

@@ -684,3 +685,3 @@ // console.log(entity);

case '/Game/FactoryGame/Character/Player/BP_PlayerState.BP_PlayerState_C':
this.readPlayerStateExtra(entity);
this.readPlayerStateExtra(entity, length);
break;

@@ -778,5 +779,12 @@ case '/Game/FactoryGame/Buildable/Vehicle/Tractor/BP_Tractor.BP_Tractor_C':

}
readPlayerStateExtra(entity) {
readPlayerStateExtra(entity, length) {
/* first byte seems to be an enum
- 03: nothing more
- 11: 17 more bytes
- 08: station name, then more bytes
*/
const unknown = this.buffer.readHex(length - this.buffer.bytesRead);
console.log('playerStateExtra: ' + unknown);
entity.extra = {
unknown: this.buffer.readHex(18)
unknown
};

@@ -798,10 +806,16 @@ }

readConveyorBeltExtra(entity, length) {
const itemCount = this.buffer.readInt();
const items = [];
for (let i = 0; i < itemCount; i++) {
/*const itemCount = this.buffer.readInt();
const items: any[] = [];
// ignore item count
while (this.buffer.bytesRead < length) {
//for (let i = 0; i < itemCount; i++) {
if (this.buffer.bytesRead >= length) {
console.warn('Item count is ' + itemCount +
' while there are only ' + i + ' items in there');
//console.warn('Item count is ' + itemCount +
//' while there are only ' + i + ' items in there');
break;
}
console.log(length - this.buffer.bytesRead + ' left ' + itemCount);
this.buffer.assertNullInt();

@@ -811,2 +825,3 @@ const name = this.buffer.readLengthPrefixedString();

this.buffer.assertNullInt();
items.push({

@@ -819,3 +834,3 @@ name,

items
};
};*/
}

@@ -822,0 +837,0 @@ error(message) {

{
"name": "satisfactory-json",
"version": "0.0.12",
"version": "0.0.13",
"description": "Convert Satisfactory save files to JSON and back",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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